main.js 1.2 KB
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'
// require styles
import 'swiper/dist/css/swiper.css'
Vue.use(VueAwesomeSwiper)


import Mock from './mock'
Mock.bootstrap();


// 视频
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
// import 'vue-video-player/src/custom-theme.css'

Vue.use(VueVideoPlayer,
	/* {
  options: global default options,
  events: global videojs events
} */
)

// 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'));
	}
}).$mount('#app')