jinjianback1.1/src/main.js

44 lines
1009 B
JavaScript
Raw Normal View History

2017-06-26 13:38:24 +08:00
import Vue from 'vue'
2017-12-14 16:41:09 +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'
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-04-19 20:41:52 +08:00
* If you don't want to use mock-server
* you want to use MockJs for mock api
* you can execute: mockXHR()
2019-04-19 20:41:52 +08:00
*
* Currently MockJs will be used in the production environment,
* please remove it before going online! ! !
*/
import { mockXHR } from '../mock'
if (process.env.NODE_ENV === 'production') {
mockXHR()
}
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 })
2019-10-25 18:23:53 +08:00
// 如果想要中文版 element-ui按如下方式声明
// Vue.use(ElementUI)
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
})