|
@@ -20,7 +20,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onMounted, onUnmounted, ref } from "vue";
|
|
|
|
|
|
|
+import { onMounted, onUnmounted, ref, nextTick } from "vue";
|
|
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
|
|
import router from "../router";
|
|
import router from "../router";
|
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
@@ -233,7 +233,8 @@ function generateMarkers(points, type) {
|
|
|
return markers;
|
|
return markers;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function drawMarkers() {
|
|
|
|
|
|
|
+async function drawMarkers() {
|
|
|
|
|
+ await nextTick();
|
|
|
let markers = [
|
|
let markers = [
|
|
|
...generateMarkers(props.ships, "ships"),
|
|
...generateMarkers(props.ships, "ships"),
|
|
|
...generateMarkers(props.loadPorts, "loadPorts"),
|
|
...generateMarkers(props.loadPorts, "loadPorts"),
|