From a4a4db4d04174541e4b44b83583be515f77b10b4 Mon Sep 17 00:00:00 2001 From: 陈泽平 <chenzeping> Date: 星期二, 18 五月 2021 16:30:10 +0800 Subject: [PATCH] 应急问题修改 --- src/main.js | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/main.js b/src/main.js index 96479c7..a2d5681 100644 --- a/src/main.js +++ b/src/main.js @@ -1,3 +1,4 @@ +// import 'babel-polyfill' import Vue from 'vue' import App from './App.vue' import router from './router' @@ -7,23 +8,42 @@ import echartsDarkTheme from '@/styles/theme-dark/echarts/theme.json' import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' +import '@assets/css/iconfont/iconfont.css' +import '@assets/css/map/_map-variable.less' +import '@assets/css/map/map-panel-style.less' +import 'leaflet/dist/leaflet.css' +import L from 'leaflet' +import '@/utils/dialogDrag.js' +import '@components/plugin/leaflet-measure-path/leaflet-measure-path.css' +import '@components/plugin/leaflet-measure-path/leaflet-measure-path' +import '@components/plugin/PathDrag' +// import '@components/plugin/flowline' + +import layer from './components/layer' +const appConfig = require('@/app.config') Vue.config.productionTip = false -Vue.use(ElementUI, { size: 'small' }) -// 娉ㄥ唽鎸囦护 +Vue.use(ElementUI) +Vue.prototype.$cancels = [] +Vue.prototype.L = L +Vue.prototype.$config = appConfig +Vue.prototype.$echarts = echarts // 鎸傝浇echarts +window.Vue = Vue +window.$layer = layer(Vue) +// 娉ㄥ唽鎸囦护7 // registerDirectives(Vue) // 娉ㄥ唽echarts鐨偆 echarts.registerTheme('dark', echartsDarkTheme) // 寮�鍙戠幆澧冧笅鍔犺浇鍋囨暟鎹� -if (process.env.NODE_ENV === 'development') { - console.log('褰撳墠澶勪簬寮�鍙戞ā寮忥紒') +if (process.env.VUE_APP_MOCK && process.env.NODE_ENV === 'development') { + console.warn('褰撳墠澶勪簬mock鏁版嵁璇锋眰锛�') + // require('./mock') } - window.vm = new Vue({ router, store, - render: h => h(App), + render: h => h(App) }).$mount('#app') -- Gitblit v1.8.0