main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import Vue from 'vue'
  2. import 'normalize.css/normalize.css' // A modern alternative to CSS resets
  3. import ElementUI from 'element-ui'
  4. import 'element-ui/lib/theme-chalk/index.css'
  5. // import locale from 'element-ui/lib/locale/lang/en' // lang i18n
  6. import echarts from 'echarts'
  7. import '@/styles/index.scss' // global css
  8. import '@/customIcons/icon.css' // 自定义icon
  9. import App from './App.vue'
  10. import store from './store'
  11. import router from './router'
  12. import '@/icons' // icon
  13. import '@/permission' // permission control
  14. /**
  15. * If you don't want to use mock-server
  16. * you want to use MockJs for mock api
  17. * you can execute: mockXHR()
  18. *
  19. * Currently MockJs will be used in the production environment,
  20. * please remove it before going online ! ! !
  21. */
  22. Vue.prototype.$echarts = echarts
  23. // if (process.env.NODE_ENV === 'production') {
  24. // const { mockXHR } = require('../mock')
  25. // mockXHR()
  26. // }
  27. // set ElementUI lang to EN
  28. // Vue.use(ElementUI, { locale })
  29. // 如果想要中文版 element-ui,按如下方式声明
  30. Vue.use(ElementUI)
  31. Vue.config.productionTip = false
  32. new Vue({
  33. el: '#app',
  34. router,
  35. store,
  36. render: (h) => h(App)
  37. })