main.js 881 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

Vue.use(VueI18n)
const i18n = new VueI18n({
	locale: localStorage.getItem("lang") || 'zh', // 语言标识
	//this.$i18n.locale // 通过切换locale的值来实现语言切换
	messages: {
		'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')