From 2f2b82b2d6ba5b5bac0d4d8ca1a9d278f95057d2 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Fri, 9 Sep 2022 19:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20=E4=BA=A4=E6=8E=A5=E7=82=B9?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=9C=B0=E5=9B=BE=E6=95=B0=E6=8D=AE=E4=B9=9F?= =?UTF-8?q?=E8=83=BD=E5=B1=95=E7=A4=BA=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AMap/src/AMapDesigner/index.vue | 3 ++- src/views/common/mapLogistic/MapLogisticModal.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index 21828b0..bd1e3ea 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -739,7 +739,7 @@ } /** 清除表单校验数据 */ - function formClearValidate(fields: string[] | string) { + function formClearValidate(fields?: string[] | string) { return formElRef.value.clearValidate(fields); } @@ -839,6 +839,7 @@ setTableData([]); // 重置地图画布 map?.setZoomAndCenter(mapState.mapConfig.options.zoom, mapState.mapConfig.options.center); + driving?.clear(); }); } diff --git a/src/views/common/mapLogistic/MapLogisticModal.vue b/src/views/common/mapLogistic/MapLogisticModal.vue index 93a2d13..a1507a2 100644 --- a/src/views/common/mapLogistic/MapLogisticModal.vue +++ b/src/views/common/mapLogistic/MapLogisticModal.vue @@ -45,6 +45,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data: WindowInnerData = { _tag: '' }) => { // 处理清除脏数据 + state.mapData = null; aMapDesigner.value.mapReset(); aMapDesigner.value.formClearValidate(); // 处理设置数据