45 lines
961 B
JavaScript
45 lines
961 B
JavaScript
import Vue from 'vue';
|
|
|
|
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
|
|
|
|
import ElementUI from 'element-ui';
|
|
import ElementLocale from 'element-ui/lib/locale';
|
|
import 'element-ui/lib/theme-chalk/index.css';
|
|
|
|
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
|
|
|
|
import '@/styles/index.scss'; // global css
|
|
|
|
import LangStorage from '@/utils/lang';
|
|
import App from './App';
|
|
import VueI18n from 'vue-i18n';
|
|
import store from './store';
|
|
import router from './router';
|
|
|
|
import '@/icons'; // icon
|
|
import '@/permission'; // permission control
|
|
import '@/scripts/GlobalPlugin';
|
|
import '@/directives';
|
|
import messages from '@/i18n/index';
|
|
|
|
Vue.use(ElementUI);
|
|
Vue.use(VueI18n);
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
export const i18n = new VueI18n({
|
|
locale: LangStorage.getLang('zh'),
|
|
messages
|
|
});
|
|
|
|
ElementLocale.i18n((key, value) => i18n.t(key, value));
|
|
|
|
new Vue({
|
|
el: '#app',
|
|
router,
|
|
store,
|
|
i18n,
|
|
render: h => h(App)
|
|
});
|
|
|