2017-06-26 13:38:24 +08:00
|
|
|
import Vue from 'vue'
|
2017-12-14 16:41:09 +08:00
|
|
|
|
2018-08-16 11:08:53 +08:00
|
|
|
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
2017-12-14 16:41:09 +08:00
|
|
|
|
2017-08-30 17:42:06 +08:00
|
|
|
import ElementUI from 'element-ui'
|
2017-11-24 13:50:31 +08:00
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
2018-05-02 18:00:01 +08:00
|
|
|
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
|
2017-12-14 16:41:09 +08:00
|
|
|
|
|
|
|
import '@/styles/index.scss' // global css
|
|
|
|
|
2017-06-26 13:38:24 +08:00
|
|
|
import App from './App'
|
|
|
|
import store from './store'
|
2019-01-30 14:13:03 +08:00
|
|
|
import router from './router'
|
2017-12-14 16:41:09 +08:00
|
|
|
|
2017-08-30 17:42:06 +08:00
|
|
|
import '@/icons' // icon
|
2017-12-14 16:41:09 +08:00
|
|
|
import '@/permission' // permission control
|
2017-06-26 13:38:24 +08:00
|
|
|
|
2019-02-20 13:16:24 +08:00
|
|
|
/**
|
2019-04-19 20:41:52 +08:00
|
|
|
* If you don't want to use mock-server
|
2019-05-13 12:56:39 +08:00
|
|
|
* you want to use MockJs for mock api
|
|
|
|
* you can execute: mockXHR()
|
2019-04-19 20:41:52 +08:00
|
|
|
*
|
2019-05-13 12:56:39 +08:00
|
|
|
* Currently MockJs will be used in the production environment,
|
|
|
|
* please remove it before going online! ! !
|
2019-02-20 13:16:24 +08:00
|
|
|
*/
|
2019-05-13 12:56:39 +08:00
|
|
|
import { mockXHR } from '../mock'
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
mockXHR()
|
|
|
|
}
|
2019-02-20 13:16:24 +08:00
|
|
|
|
2019-04-19 20:41:52 +08:00
|
|
|
// set ElementUI lang to EN
|
2017-09-15 13:45:09 +08:00
|
|
|
Vue.use(ElementUI, { locale })
|
2017-06-26 13:38:24 +08:00
|
|
|
|
2017-08-30 17:42:06 +08:00
|
|
|
Vue.config.productionTip = false
|
2017-06-26 13:38:24 +08:00
|
|
|
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
router,
|
|
|
|
store,
|
2018-06-25 11:15:02 +08:00
|
|
|
render: h => h(App)
|
2017-06-26 13:38:24 +08:00
|
|
|
})
|