main.js 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 router from './router'
  6. import Elementui from 'element-ui'
  7. import VueAMap from 'vue-amap';
  8. import {get, post, postJson} from './api/http'
  9. import Tool from './api/tool'
  10. Vue.prototype.$tool = Tool;
  11. Vue.config.productionTip = false
  12. Vue.prototype.$get = get;
  13. Vue.prototype.$post = post;
  14. Vue.prototype.$postJson = postJson;
  15. Vue.use(VueAMap);
  16. Vue.use(Elementui)
  17. VueAMap.initAMapApiLoader({
  18. key: '610161977d2e2632eb34aff3e88a079f',
  19. plugin: ['AMap.Scale','AMap.OverView','AMap.ToolBar','AMap.MapType','AMap.PlaceSearch','AMap.Geolocation','AMap.Geocoder'],
  20. v: '1.4.4',
  21. uiVersion: '1.0'
  22. })
  23. /* eslint-disable no-new */
  24. new Vue({
  25. el: '#app',
  26. router,
  27. components: { App },
  28. template: '<App/>'
  29. })