import './plugins/axios'; import './registerServiceWorker'; import './plugins/ant-design-vue.js'; import 'common/portrait.styl'; import './assets/icon/iconfont.css'; import 'moment/locale/zh-cn'; import * as echarts from 'echarts'; import App from './App.vue'; // @ts-ignore import Vue from 'vue'; import moment from 'moment'; //导入文件 import router from './router'; import store from './store'; moment.locale('zh-cn'); Vue.prototype.$echarts = echarts; Vue.prototype.$moment = moment; //赋值使用 Vue.config.productionTip = false; router.beforeEach((to, from, next) => { //to and from are Route Object,next() must be called to resolve the hook} document.title = to.matched[0].meta.title; next(); }); window.vm = new Vue({ router, store, render: h => h(App), }).$mount('#app');