main.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import App from './App'
  5. import ElementUI from 'element-ui'
  6. import 'element-ui/lib/theme-chalk/index.css'
  7. import VueAMap from 'vue-amap'
  8. import Cookies from 'vue-cookie'
  9. import './style/main.css'
  10. import router from './router'
  11. import Ajax from './util/ajax'
  12. import api from './util/api'
  13. import toolClass from './util/util'
  14. import store from './store'
  15. import Vuex from 'vuex'
  16. import md5 from 'js-md5'
  17. import VueQuillEditor from 'vue-quill-editor'
  18. // require styles 引入样式
  19. import 'quill/dist/quill.core.css'
  20. import 'quill/dist/quill.snow.css'
  21. import 'quill/dist/quill.bubble.css'
  22. const Base64 = require('js-base64').Base64
  23. Vue.use(ElementUI)
  24. Vue.use(Cookies)
  25. Vue.use(VueAMap)
  26. Vue.use(Vuex)
  27. Vue.use(VueQuillEditor)
  28. VueAMap.initAMapApiLoader({
  29. key: 'f0d1d4f82432504003ebf46e5e36ff03',
  30. plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
  31. // 默认高德 sdk 版本为 1.4.4
  32. v: '1.4.4'
  33. })
  34. Vue.config.productionTip = false
  35. Vue.prototype.$api = api
  36. Vue.prototype.$ajax = Ajax
  37. Vue.prototype.md5 = md5
  38. Vue.prototype.Base64 = Base64
  39. Vue.prototype.toolClass = toolClass
  40. /* eslint-disable no-new */
  41. new Vue({
  42. el: '#app',
  43. router,
  44. store,
  45. components: { App },
  46. template: '<App/>'
  47. })