7dd92deddd491555a20a5b62af18c0fb0b7142bc.svn-base 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/zh-CN' // 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. import * as filters from './filters' // global filters
  13. /**
  14. * If you don't want to use mock-server
  15. * you want to use MockJs for mock api
  16. * you can execute: mockXHR()
  17. *
  18. * Currently MockJs will be used in the production environment,
  19. * please remove it before going online! ! !
  20. */
  21. // import { mockXHR } from '../mock'
  22. if (process.env.NODE_ENV === 'production') {
  23. // mockXHR()
  24. }
  25. // set ElementUI lang to EN
  26. Vue.use(ElementUI, { locale })
  27. // register global utility filters
  28. Object.keys(filters).forEach(key => {
  29. Vue.filter(key, filters[key])
  30. })
  31. Vue.config.productionTip = false
  32. new Vue({
  33. el: '#app',
  34. router,
  35. store,
  36. render: h => h(App)
  37. })