import 'amfe-flexible' import Vue from 'vue' import App from './App' import router from './router' import init from './config/init' Vue.config.productionTip = false // 注册全局组件 init.VueComponents.forEach(v => Vue.component(v.name, v)) // 初始化vue插件 init.VuePlugIn.forEach(v => Vue.use(v)) // 挂载非vue插件到vue实例中,这样可以全局调用方法 for (const key in init.NotVuePlugIn) Vue.prototype[key] = init.NotVuePlugIn[key] /* eslint-disable no-new */ new Vue({ el: '#app', router, components: { App }, template: '' })