Blame view

HHECS.Web/src/main.js 1.34 KB
胡菁 authored
1
2
import "normalize.css/normalize.css"; // A modern alternative to CSS resets
import Vue from "vue";
胡菁 authored
3
// 多语言
胡菁 authored
4
// Vue.prototype.$gl = window.$gl
胡菁 authored
5
胡菁 authored
6
7
import ElementUI from "element-ui";
import i18n from "./i18n";
胡菁 authored
8
// import locale from "element-ui/lib/locale/lang/zh-CN"; // lang i18n
胡菁 authored
9
// import locale from 'element-ui/lib/locale/lang/zh-CN'; // lang i18n
胡菁 authored
10
import "element-ui/lib/theme-chalk/index.css";
胡菁 authored
11
胡菁 authored
12
import "@/styles/index.scss"; // global css
胡菁 authored
13
胡菁 authored
14
15
16
import App from "./App";
import router from "./router";
import store from "./store";
胡菁 authored
17
胡菁 authored
18
19
import "@/icons"; // icon
import "@/permission"; // permission control
胡菁 authored
20
胡菁 authored
21
// momentjs.cn/ 日期处理组件 获取当前月初、月末、时间区间段 等
胡菁 authored
22
23
import moment from "moment";
Vue.prototype.$moment = moment;
胡菁 authored
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 ! ! !
 */
胡菁 authored
32
33
34
if (process.env.NODE_ENV === "production") {
  const { mockXHR } = require("../mock");
  mockXHR();
胡菁 authored
35
36
37
}

// set ElementUI lang to EN
胡菁 authored
38
Vue.use(ElementUI, {
胡菁 authored
39
40
  i18n: (key, value) => i18n.t(key, value),
});
胡菁 authored
41
42
43
// 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
胡菁 authored
44
Vue.config.productionTip = false;
胡菁 authored
45
46

new Vue({
胡菁 authored
47
  el: "#app",
胡菁 authored
48
49
  router,
  store,
胡菁 authored
50
  i18n,
胡菁 authored
51
52
  render: (h) => h(App),
});