Browse Source

🚀 修复地图完成回调地图存在不会触发

master
wangxiang 3 years ago
parent
commit
7f1a4f57fd
  1. 4
      src/components/AMap/src/AMapDesigner/index.vue
  2. 4
      src/views/common/mapLogistic/index.vue

4
src/components/AMap/src/AMapDesigner/index.vue

@ -495,12 +495,10 @@ @@ -495,12 +495,10 @@
/** 地图创建完成(动画关闭) */
function complete () {
if (map) {
map.on('complete', () => {
setMapDataJson(mapProps.options);
handleSetCourierUserList();
mapState.loading = false;
mapState.first = true;
});
}
}
@ -512,7 +510,7 @@ @@ -512,7 +510,7 @@
if (!mapProps.toolbarControl) mapState.toggleOperatePanelClass.toolbarHeight = 0;
});
watch(toRefs(mapProps).options, (newValue) => {
if (mapState.first) {
if (mapState.first && newValue) {
setMapDataJson(newValue);
handleSetCourierUserList();
}

4
src/views/common/mapLogistic/index.vue

@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary"
<!--<a-button type="primary"
@click="() => {}"
>预览</a-button>
>预览</a-button>-->
<a-button type="primary"
@click="handleAdd"
>新增</a-button>

Loading…
Cancel
Save