main.js 927 Bytes
Newer Older
Pan's avatar
Pan committed
1
import Vue from 'vue'
Pan's avatar
Pan committed
2

3
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
Pan's avatar
Pan committed
4

Pan's avatar
Pan committed
5
import ElementUI from 'element-ui'
Pan's avatar
Pan committed
6
import 'element-ui/lib/theme-chalk/index.css'
Pan's avatar
Pan committed
7
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
Pan's avatar
Pan committed
8 9 10

import '@/styles/index.scss' // global css

Pan's avatar
Pan committed
11 12
import App from './App'
import store from './store'
13
import router from './router'
Pan's avatar
Pan committed
14

Pan's avatar
Pan committed
15
import '@/icons' // icon
Pan's avatar
Pan committed
16
import '@/permission' // permission control
Pan's avatar
Pan committed
17

18
/**
花裤衩's avatar
花裤衩 committed
19
 * If you don't want to use mock-server
20 21
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
花裤衩's avatar
花裤衩 committed
22
 *
23 24
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
25
 */
26 27 28 29
import { mockXHR } from '../mock'
if (process.env.NODE_ENV === 'production') {
  mockXHR()
}
30

花裤衩's avatar
花裤衩 committed
31
// set ElementUI lang to EN
32
Vue.use(ElementUI, { locale })
Pan's avatar
Pan committed
33

Pan's avatar
Pan committed
34
Vue.config.productionTip = false
Pan's avatar
Pan committed
35 36 37 38 39

new Vue({
  el: '#app',
  router,
  store,
Pan's avatar
Pan committed
40
  render: h => h(App)
Pan's avatar
Pan committed
41
})