123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import Vue from 'vue'
- import 'normalize.css/normalize.css' // A modern alternative to CSS resets
- import ElementUI from 'element-ui'
- //import 'element-ui/lib/theme-chalk/index.css'
- //babel只能处理语法上的转化,而一些新的API他是没有办法处理的,
- // 比如Promise这些,这就需要babel-polyfill去处理这些新的API。
- // babel-polyfill其实是corejs和regenerater的集合,现在已经被废弃了,只需要装上面两个就可以了。
- import 'babel-polyfill'
- import 'default-passive-events' //Added non-passive event listener to a scroll-blocking 'mousewheel' event
- let sidebarType = 1;
- if(sidebarType === 1){
- import('./styles/indexA.scss')
- }else {
- import('./styles/index.scss')
- }
- import App from './App'
- import router from './router'
- import store from './store'
- import i18n from './lang' // 国际化
- import './icons' // icon
- import './permission' // router permission control
- import './utils/btnPermissions.js' //button - permission control
- import * as filters from './filters' // 全局filter 方法
- import './plugins/element.js'
- import './assets/wg/js'
- import './components/wgBase'
- import Highlight from './utils/highlight' //高亮
- Vue.use(Highlight);
- import VueDND from 'awe-dnd'
- // register global utility filters. 注册filter工具
- Object.keys(filters).forEach(key => {
- Vue.filter(key, filters[key])
- });
- Vue.use(VueDND) ; //引入可拖拽插件
- Vue.use(ElementUI, {
- // locale,
- i18n: (key, value) => i18n.t(key, value)
- });
- Vue.prototype.sidebarType = sidebarType; //挂载到Vue实例上面
- //关闭开放环境提示
- Vue.config.productionTip = false;
- new Vue({
- el: '#app',
- router,
- store,
- i18n,
- render: h => h(App),
- beforeCreate(){
- //安装全局事件总线
- Vue.prototype.$event_bus = this;
- }
- });
|