main.js 841 B

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