main.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. var MessageWrapper = function (options) {
  26. if (typeof (options) === 'object') {
  27. options = Object.assign({}, MY_MESSAGE_DEFAULT, options)
  28. }
  29. return Message(options)
  30. }
  31. for(var key in Message){
  32. MessageWrapper[key] = Message[key]
  33. }
  34. Vue.prototype.$message = MessageWrapper
  35. new Vue({
  36. router,
  37. store,
  38. render: h => h(App)
  39. }).$mount('#app')