rt-sim-training-client/src/main.js

51 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-07-04 10:59:40 +08:00
import Vue from 'vue';
2019-07-02 16:29:52 +08:00
2019-07-04 10:59:40 +08:00
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
2019-07-02 16:29:52 +08:00
2019-07-04 10:59:40 +08:00
import ElementUI from 'element-ui';
import ElementLocale from 'element-ui/lib/locale';
2019-07-04 10:59:40 +08:00
import 'element-ui/lib/theme-chalk/index.css';
2019-07-02 16:29:52 +08:00
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
2019-07-04 10:59:40 +08:00
import '@/styles/index.scss'; // global css
2019-07-02 16:29:52 +08:00
2019-08-08 11:29:03 +08:00
import LangStorage from '@/utils/lang';
2019-07-04 10:59:40 +08:00
import App from './App';
2019-08-08 11:29:03 +08:00
import VueI18n from 'vue-i18n';
2019-07-04 10:59:40 +08:00
import store from './store';
import router from './router';
2019-07-02 16:29:52 +08:00
2019-07-04 10:59:40 +08:00
import '@/icons'; // icon
import '@/permission'; // permission control
import '@/scripts/GlobalPlugin';
2019-10-18 15:17:33 +08:00
// import '@/directives';
import '@/directive/dialogDrag/index.js';
import '@/directive/dialogDragWidth/index.js';
import '@/directive/drag/index.js';
import '@/directive/focus/index.js';
import '@/directive/quickMenuDrag/index.js';
import '@/directive/waves/index.js';
2019-08-08 11:29:03 +08:00
import messages from '@/i18n/index';
2019-07-04 10:59:40 +08:00
Vue.use(ElementUI);
2019-08-08 11:29:03 +08:00
Vue.use(VueI18n);
2019-07-02 16:29:52 +08:00
2019-07-04 10:59:40 +08:00
Vue.config.productionTip = false;
2019-07-02 16:29:52 +08:00
2019-08-09 15:10:13 +08:00
export const i18n = new VueI18n({
2019-08-15 16:11:09 +08:00
locale: LangStorage.getLang('zh'),
2019-08-08 11:29:03 +08:00
messages
});
ElementLocale.i18n((key, value) => i18n.t(key, value));
2019-08-02 14:54:51 +08:00
new Vue({
2019-07-02 16:29:52 +08:00
el: '#app',
router,
store,
2019-08-08 11:29:03 +08:00
i18n,
2019-07-02 16:29:52 +08:00
render: h => h(App)
2019-07-04 10:59:40 +08:00
});
2019-08-14 10:12:51 +08:00