import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' import('./styles/indexA.scss') //import 'element-ui/lib/theme-chalk/index.css' //babel只能处理语法上的转化,而一些新的API他是没有办法处理的, // 比如Promise这些,这就需要babel-polyfill去处理这些新的API。 // babel-polyfill其实是corejs和regenerater的集合,现在已经被废弃了,只需要装上面两个就可以了。 import 'babel-polyfill' import App from './App' import router from './router' import store from './store' import './icons' // icon import './permission' // router permission control import './plugins/element.js' import Highlight from './utils/highlight' //高亮 Vue.use(Highlight); // register global utility filters. 注册filter工具 // Object.keys(filters).forEach(key => { // Vue.filter(key, filters[key]) // }); Vue.use(ElementUI); //关闭开放环境提示 Vue.config.productionTip = false; new Vue({ el: '#app', router, store, render: h => h(App), beforeCreate() { //安装全局事件总线 Vue.prototype.$event_bus = this; } });