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

46 lines
1.0 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-11-14 14:10:20 +08:00
import ELEMENT from 'element-ui';
2019-07-02 16:29:52 +08:00
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-11-13 09:06:57 +08:00
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 '@/directive/dialogDrag/index.js';
import '@/directive/dialogDragWidth/index.js';
2019-11-14 13:59:33 +08:00
import '@/directive/dialogLoading/index.js';
2019-10-18 15:17:33 +08:00
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-11-14 14:10:20 +08:00
Vue.use(ELEMENT);
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-11-12 17:20:23 +08:00
locale: LangStorage.getLang('zh'),
messages
2019-08-08 11:29:03 +08:00
});
2019-11-14 14:10:20 +08:00
ELEMENT.i18n((key, value) => i18n.t(key, value));
2019-08-02 14:54:51 +08:00
new Vue({
2019-11-12 17:20:23 +08:00
el: '#app',
router,
store,
i18n,
render: h => h(App)
2019-07-04 10:59:40 +08:00
});