main.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import Vue from 'vue'
  2. import ElementUI from 'element-ui'
  3. import 'normalize.css/normalize.css' // A modern alternative to CSS resets
  4. import 'default-passive-events'
  5. import 'element-ui/lib/theme-chalk/index.css'
  6. import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
  7. import '@/styles/index.scss' // global css
  8. import App from './App'
  9. import store from './store'
  10. import router from './router'
  11. import './utils/vueFilter'
  12. // Vue.use(vueFilter)
  13. import '@/icons' // icon
  14. import '@/permission' // permission control
  15. /**
  16. * If you don't want to use mock-server
  17. * you want to use MockJs for mock api
  18. * you can execute: mockXHR()
  19. *
  20. * Currently MockJs will be used in the production environment,
  21. * please remove it before going online! ! !
  22. */
  23. // import { mockXHR } from '../mock'
  24. // if (process.env.NODE_ENV === 'production') {
  25. // mockXHR()
  26. // }
  27. // 高德地址
  28. import VueAMap from 'vue-amap'
  29. Vue.use(VueAMap)
  30. VueAMap.initAMapApiLoader({
  31. key: 'b1e6ac2eb28902ce91a490edf194e000',
  32. plugin: ['AMap.Geolocation', 'AMap.PlaceSearch', 'AMap.Geocoder'],
  33. v: '1.4.4'
  34. })
  35. // set ElementUI lang to EN
  36. Vue.use(ElementUI, { locale })
  37. Vue.config.productionTip = false
  38. new Vue({
  39. el: '#app',
  40. router,
  41. store,
  42. render: h => h(App)
  43. })