main.js
1.2 KB
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
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import App from './App.vue';
import router from './router';
import store from './store/index';
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper)
// vant
import {
Collapse,
CollapseItem,
Icon
} from 'vant';
Vue.use(Collapse).use(CollapseItem);
Vue.use(Icon);
import Mock from './mock'
Mock.bootstrap();
// 视频
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
Vue.use(VueVideoPlayer)
// import 'amfe-flexible';
Vue.config.productionTip = false
// Purecss
// import Purecss from 'purecss'
// Vue.use(Purecss);
// 国际化
Vue.use(VueI18n)
const i18n = new VueI18n({
locale: localStorage.getItem("lang") || 'tc', // 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages: {
'tc': require('@/common/lang/tc'), // 繁体语言包
'zh': require('@/common/lang/zh'), // 简体语言包
'en': require('@/common/lang/en'), // 英文语言包
}
})
new Vue({
i18n,
router,
store,
render: h => h(App),
mounted: () => {
document.dispatchEvent(new Event('render-event'));
},
data: {
bus: new Vue()
}
}).$mount('#app')