|
1
2
|
import "normalize.css/normalize.css"; // A modern alternative to CSS resets
import Vue from "vue";
|
|
3
|
// 多语言
|
|
4
|
// Vue.prototype.$gl = window.$gl
|
|
5
|
|
|
6
7
|
import ElementUI from "element-ui";
import i18n from "./i18n";
|
|
8
|
// import locale from "element-ui/lib/locale/lang/zh-CN"; // lang i18n
|
|
9
|
// import locale from 'element-ui/lib/locale/lang/zh-CN'; // lang i18n
|
|
10
|
import "element-ui/lib/theme-chalk/index.css";
|
|
11
|
|
|
12
|
import "@/styles/index.scss"; // global css
|
|
13
|
|
|
14
15
16
|
import App from "./App";
import router from "./router";
import store from "./store";
|
|
17
|
|
|
18
19
|
import "@/icons"; // icon
import "@/permission"; // permission control
|
|
20
|
|
|
21
|
// momentjs.cn/ 日期处理组件 获取当前月初、月末、时间区间段 等
|
|
22
23
|
import moment from "moment";
Vue.prototype.$moment = moment;
|
|
24
25
26
27
28
29
30
31
|
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api
* you can execute: mockXHR()
*
* Currently MockJs will be used in the production environment,
* please remove it before going online ! ! !
*/
|
|
32
33
34
|
if (process.env.NODE_ENV === "production") {
const { mockXHR } = require("../mock");
mockXHR();
|
|
35
36
37
|
}
// set ElementUI lang to EN
|
|
38
|
Vue.use(ElementUI, {
|
|
39
40
|
i18n: (key, value) => i18n.t(key, value),
});
|
|
41
42
43
|
// 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
|
|
44
|
Vue.config.productionTip = false;
|
|
45
46
|
new Vue({
|
|
47
|
el: "#app",
|
|
48
49
|
router,
store,
|
|
50
|
i18n,
|
|
51
52
|
render: (h) => h(App),
});
|