main.js 1011 Bytes
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, /* { default global options } */ )


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

// 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')