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
|
2020-03-31 16:54:04 +08:00
|
|
|
import ElementUI from 'element-ui';
|
|
|
|
import 'element-ui/lib/theme-chalk/index.css';
|
2019-07-04 10:59:40 +08:00
|
|
|
import '@/styles/index.scss'; // global css
|
2020-05-26 15:59:11 +08:00
|
|
|
import 'quill/dist/quill.snow.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
|
|
|
|
2020-12-15 11:18:15 +08:00
|
|
|
import store from './store/index';
|
2021-01-11 10:55:07 +08:00
|
|
|
import router from './router/index';
|
2020-01-13 14:40:24 +08:00
|
|
|
import CancelMouseState from '@/mixin/CancelMouseState.js';
|
|
|
|
Vue.mixin(CancelMouseState);
|
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';
|
|
|
|
|
2020-03-31 16:54:04 +08:00
|
|
|
Vue.use(ElementUI);
|
2019-08-08 11:29:03 +08:00
|
|
|
Vue.use(VueI18n);
|
2020-03-25 13:45:58 +08:00
|
|
|
Vue.config.devtools = true; // 开发环境显示vue控制台
|
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
|
|
|
});
|
2020-04-01 13:47:29 +08:00
|
|
|
Vue.use(ElementUI, {i18n: (key, value) => i18n.t(key, value)});
|
2019-08-30 18:20:07 +08:00
|
|
|
|
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
|
|
|
});
|