avue地图坐标选择器的地址https://avuejs.com/doc/plugins/map-plugins
只是记录如何使用该地图坐标选择器,基于高德地图的。(如何使用的,并不做修改扩展)
1.引用部分可以按照官方网站引用
<!-- 导入需要的包 -->
<script type="text/javascript" src='https://webapi.amap.com/mapsv=1.4.11&key=7ab53b28352e55dc5754699add0ad862&plugin=AMap.PlaceSearch'></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
1.npm install avue-plugin-map --save
2.import AvueMap from 'avue-plugin-map'
3.Vue.use(AvueMap);
2.重点!!!在表格组件中如何配置
如下图表格组件的配置,配置过之后在新增,编辑的时候就可以弹出地图选择啦


因为我的需求是只想使用经纬度,So,我使用了表单插槽,之后监听地图选点的值的变化,然后在进行赋值操作。




网友评论