main.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. // 引入富文本
  11. import '../public/UEditor/ueditor.all.min.js'
  12. import '../public/UEditor/ueditor.config.js'
  13. import '../public/UEditor/ueditor.parse.min.js'
  14. // import '../public/UEditor/lang/zh-cn/zh-cn.js'
  15. import '@/icons' // icon
  16. import '@/permission' // permission control
  17. import '@/customComponent.js'
  18. import '@/customInstructions.js'
  19. import VueClipboard from 'vue-clipboard2'
  20. Vue.use(VueClipboard)
  21. import md5 from 'js-md5'
  22. /**
  23. * If you don't want to use mock-server
  24. * you want to use MockJs for mock api
  25. * you can execute: mockXHR()
  26. *
  27. * Currently MockJs will be used in the production environment,
  28. * please remove it before going online ! ! !
  29. */
  30. // if (process.env.NODE_ENV === 'production') {
  31. // const { mockXHR } = require('../mock')
  32. // mockXHR()
  33. // }
  34. // set ElementUI lang to EN
  35. Vue.use(ElementUI, { locale, size: 'small' })
  36. // 如果想要中文版 element-ui,按如下方式声明
  37. // Vue.use(ElementUI)
  38. Vue.config.productionTip = false
  39. Vue.prototype.$md5 = md5
  40. new Vue({
  41. el: '#app',
  42. router,
  43. store,
  44. render: h => h(App)
  45. })