// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import FastClick from 'fastclick' Vue.config.productionTip = false // import 'lib-flexible/flexible.js' import 'amfe-flexible/index.js' import './config/flexible' import store from './store/' import './permission' // permission control import { getDicts } from "@/utils/data"; import { selectDictLabel , onClickLeft , getNowFormatDate } from "@/utils/utils"; //全局方法挂载 Vue.prototype.getDicts = getDicts Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.onClickLeft = onClickLeft Vue.prototype.getNowFormatDate = getNowFormatDate // Vant 引用 import Vant from 'vant'; import 'vant/lib/index.css'; Vue.use(Vant) /*解决手动点击与真正触发click事件会存在300ms的延迟*/ if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded', function () { FastClick.attach(document.body); }, false); } //设置动态登录页 router.beforeEach((to, from, next) => { if (to.meta.title) { document.title = to.meta.title } next() }) /* eslint-disable no-new */ new Vue({ el: '#app', router, store, components: { App }, template: '' })