import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' Vue.config.productionTip = false import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; Vue.use(ElementUI); import "./style/deleelement.css" import $ from "jquery" Vue.prototype.$ = $ import "@/common/font/font.css" import "@/permission" import i18n from "@/utils/i18n" import zh_tran from "@/utils/lang.js" Vue.prototype.$zh_tran = zh_tran // element 下拉框下拉加载 Vue.directive('loadmore', { bind(el, binding) { // 获取element-ui定义好的scroll盒子 const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') SELECTWRAP_DOM.addEventListener('scroll', function() { const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight if (CONDITION) { binding.value() } }) } }) new Vue({ router, store, i18n, render: h => h(App) }).$mount('#app')