main.js 927 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 '@/styles/index.scss' // global css
  7. import App from './App'
  8. import store from './store'
  9. import router from './router'
  10. import '@/icons' // icon
  11. import '@/permission' // permission control
  12. /**
  13. * If you don't want to use mock-server
  14. * you want to use MockJs for mock api
  15. * you can execute: mockXHR()
  16. *
  17. * Currently MockJs will be used in the production environment,
  18. * please remove it before going online! ! !
  19. */
  20. import { mockXHR } from '../mock'
  21. if (process.env.NODE_ENV === 'production') {
  22. mockXHR()
  23. }
  24. // set ElementUI lang to EN
  25. Vue.use(ElementUI, { locale })
  26. Vue.config.productionTip = false
  27. new Vue({
  28. el: '#app',
  29. router,
  30. store,
  31. render: h => h(App)
  32. })