import Vue from 'vue' import App from './App.vue' import router from './router/index' import store from './store/index' import './plugins/element.js' import './style/index.styl' import './icon/iconfont.css' import _ from 'lodash' import dayjs from 'dayjs' import common from '@/utils/common' import G2 from '@antv/g2' Vue.prototype._ = _ Vue.prototype.dayjs = dayjs Vue.prototype.getprovince = common.getprovince Vue.prototype.getcity = common.getcity Vue.prototype.window = window Vue.config.devtools = true Vue.config.productionTip = false Vue.use(G2) // 提交以后禁用按钮一段时间,防止重复提交,如需使用请在对应有点击事件的标签加上v-no-more-click即可 Vue.directive('noMoreClick', { inserted(el, binding) { el.addEventListener('click', e => { el.classList.add('is-disabled'); el.disabled = true; setTimeout(() => { el.disabled = false; el.classList.remove('is-disabled'); }, 3000) }) } }); new Vue({ router, store, render: h => h(App) }).$mount('#app')