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,