shuishen
2022-11-02 764cb58899b8ca0e9632a5e83c6950569442c41c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import Vue from 'vue'
import axios from './router/axios'
import VueAxios from 'vue-axios'
import App from './App'
import router from './router/router'
import './permission' // 权限
import './error' // 日志
import './cache' //页面缓存
import store from './store'
import {
    loadStyle
} from './util/util'
import * as urls from '@/config/env'
import Element from 'element-ui'
import {
    iconfontUrl,
    iconfontVersion
} from '@/config/env'
import i18n from './lang' // Internationalization
import './styles/common.scss'
import basicBlock from './components/basic-block/main'
import basicContainer from './components/basic-container/main'
import thirdRegister from './components/third-register/main'
import avueUeditor from 'avue-plugin-ueditor'
import website from '@/config/website'
import crudCommon from '@/mixins/crud'
// 注册全局crud驱动
window.$crudCommon = crudCommon
// 加载Vue拓展
Vue.use(router)
Vue.use(VueAxios, axios)
Vue.use(Element, {
    i18n: (key, value) => i18n.t(key, value)
})
Vue.use(window.AVUE, {
    size: 'small',
    tableSize: 'small',
    calcHeight: 65,
    i18n: (key, value) => i18n.t(key, value)
})
// 注册全局容器
Vue.component('basicContainer', basicContainer)
Vue.component('basicBlock', basicBlock)
Vue.component('thirdRegister', thirdRegister)
Vue.component('avueUeditor', avueUeditor)
// 加载相关url地址
Object.keys(urls).forEach(key => {
    Vue.prototype[key] = urls[key]
})
// 加载website
Vue.prototype.website = website
// 动态加载阿里云字体库
iconfontVersion.forEach(ele => {
    loadStyle(iconfontUrl.replace('$key', ele))
})
 
Vue.config.productionTip = false
 
//加载全局组件选地图定位点,每个页面都要使用
import chousePoint from './components/mapOncePoint/chousePoint'
Vue.component("chousePoint", chousePoint)
 
import xymap from './components/xymap/map'
Vue.component("xymap", xymap)
 
import setxy from './components/xymap/setxy'
Vue.component("setxy", setxy)
 
new Vue({
    router,
    store,
    i18n,
    render: h => h(App)
}).$mount('#app')