main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. import htmlToPdf from '@/utils/htmlToPdf'
  13. Vue.use(htmlToPdf)
  14. import animated from 'animate.css'
  15. Vue.use(animated)
  16. /**
  17. * If you don't want to use mock-server
  18. * you want to use MockJs for mock api
  19. * you can execute: mockXHR()
  20. *
  21. * Currently MockJs will be used in the production environment,
  22. * please remove it before going online! ! !
  23. */
  24. import { mockXHR } from '../mock'
  25. if (process.env.NODE_ENV === 'production') {
  26. mockXHR()
  27. }
  28. import axios from 'axios'
  29. Vue.prototype.$http = axios
  30. // set ElementUI lang to EN
  31. // Vue.use(ElementUI, { locale }) 英文
  32. Vue.use(ElementUI)
  33. Vue.config.productionTip = false
  34. new Vue({
  35. el: '#app',
  36. router,
  37. store,
  38. render: h => h(App)
  39. })