// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import Elementui from 'element-ui' import store from './store/index.js'; import axios from 'axios' Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axios import VueAMap from 'vue-amap'; import { get, post, postJson } from './api/http' import Tool from './api/tool' Vue.prototype.$tool = Tool; Vue.config.productionTip = false Vue.prototype.$get = get; Vue.prototype.$post = post; Vue.prototype.$postJson = postJson; Vue.use(VueAMap); Vue.use(Elementui) VueAMap.initAMapApiLoader({ key: '610161977d2e2632eb34aff3e88a079f', plugin: ["AMap.Autocomplete", //输入提示插件 "AMap.PlaceSearch", //POI搜索插件 "AMap.Scale", //右下角缩略图插件 比例尺 "AMap.OverView", //地图鹰眼插件 "AMap.ToolBar", //地图工具条 "AMap.MapType", //类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制 "AMap.PolyEditor", //编辑 折线多,边形 "AMap.CircleEditor", //圆形编辑器插件 "AMap.Geolocation" //定位控件,用来获取和展示用户主机所在的经纬度位置 ], v: '1.4.4', uiVersion: '1.0' }) /* eslint-disable no-new */ new Vue({ el: '#app', router, store, components: { App }, template: '' })