From d346ff7cf2fe0b29a708ce88a043b8ddeb506e51 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Fri, 9 Sep 2022 19:32:45 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index 7cdebb5..7a3607d 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -497,12 +497,12 @@ if (!mapProps.sidebarControl) mapState.toggleOperatePanelClass.siderWidth = 0; if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0; }); - watch(toRefs(mapProps).options, (newValue) => { + watchDebounced(toRefs(mapProps).options, (newValue) => { if (mapState.first) { setMapDataJson(newValue); handleSetCourierUserList(); } - }, { deep: true }); + }, { debounce: 500, deep: true }); watch(toRefs(mapProps).isEdit, () => { if (mapState.first) { handleSetCourierUserList(); @@ -567,7 +567,8 @@ function handleSetCourierUserList() { nextTick(async ()=>{ // 修改时查询当前快递员,只需要渲染自己的收样图标 - mapProps.isEdit ? await listUser({ userType: '1', id: mapState.mapData.courierUserId }).then(res => { + (mapProps.isEdit && mapState.mapData.courierUserId) ? + await listUser({ userType: '1', id: mapState.mapData.courierUserId }).then(res => { mapState.courierUserList = res.data?.map(item => ({ value: item.id, label: item.nickName,