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