main.js 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import router from './routers'
  4. import store from './store'
  5. import echarts from 'echarts'
  6. import './plugins/element.js'
  7. import AxiosPlugin from './plugins/AxiosPlugin'
  8. import './assets/iconfont/iconfont.css'
  9. import { Message } from 'element-ui'
  10. import AMap from "vue-amap"
  11. Vue.config.productionTip = false
  12. Vue.use(AxiosPlugin);
  13. //Vue.use(ConfirmPlugin);
  14. Vue.use(AMap);
  15. AMap.initAMapApiLoader({
  16. key: "09abadb2e35fc61fd84042c518e9aebf",
  17. plugin: ["AMap.Scale", "AMap.OverView", "AMap.ToolBar", "AMap.MapType"],
  18. uiVersion: "1.0.11", // ui库版本,不配置不加载,
  19. v: "1.4.4"
  20. });
  21. Vue.prototype.$echarts = echarts
  22. var MY_MESSAGE_DEFAULT = {
  23. showClose: true
  24. }
  25. Vue.prototype.$message = function (options) {
  26. if (typeof (options) === 'object') {
  27. options = Object.assign({}, MY_MESSAGE_DEFAULT, options)
  28. }
  29. Message(options)
  30. }
  31. new Vue({
  32. router,
  33. store,
  34. render: h => h(App)
  35. }).$mount('#app')