BUG 30043
This commit is contained in:
@@ -79,10 +79,12 @@ export default {
|
||||
this.points = []
|
||||
},
|
||||
handleAdd() {
|
||||
let {polyEditor} = this
|
||||
polyEditor.close();
|
||||
polyEditor.setTarget();
|
||||
polyEditor.open();
|
||||
if (this.points?.length == 0) {
|
||||
let {polyEditor} = this
|
||||
polyEditor.close();
|
||||
polyEditor.setTarget();
|
||||
polyEditor.open();
|
||||
} else this.$message.error("请先清除已标绘图形!")
|
||||
},
|
||||
initMap() {
|
||||
setTimeout(() => AMapLoader.load({
|
||||
@@ -116,8 +118,9 @@ export default {
|
||||
})
|
||||
this.polyEditor.on('end', ({target}) => {
|
||||
if (target) {
|
||||
console.log(target.getPath())
|
||||
this.overlays.push(target);
|
||||
this.points.push(target.getPath().map((e) => ({lat: e.getLat(), lng: e.getLng()})))
|
||||
this.points = target.getPath().map(e => ({lat: e.getLat(), lng: e.getLng()}))
|
||||
}
|
||||
});
|
||||
if (this.value?.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user