From e02d398dcf57cbbc96c35ec0fb128fec7db17c84 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 25 七月 2024 18:28:08 +0800
Subject: [PATCH] 工单展示即将超市图标
---
src/views/screen/components/screen-map-three/index.vue | 38 +++++++++++++++++++++++++++++++++-----
1 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/views/screen/components/screen-map-three/index.vue b/src/views/screen/components/screen-map-three/index.vue
index 9d6eedf..806fa3e 100644
--- a/src/views/screen/components/screen-map-three/index.vue
+++ b/src/views/screen/components/screen-map-three/index.vue
@@ -1,17 +1,36 @@
<template>
- <div class="map-container" ref="mapContainer">
-
+ <div class="map-container">
+ <canvas class="world" ref="worldContainer"></canvas>
</div>
</template>
<script>
-import World from './world/world';
+import Experience from './experience/index';
let world = null;
export default {
name: 'ScreenMapThree',
+ props: {
+ loadEnd: {
+ type: Boolean,
+ default: false
+ },
+ },
+ watch: {
+ loadEnd: {
+ handler(newVal) {
+ if (newVal) {
+ world = new Experience(this.$refs.worldContainer);
+ }
+ }
+ }
+ },
mounted() {
- world = new World(this.$refs.mapContainer);
- }
+
+ },
+ beforeDestroy() {
+ world.destroy();
+ world = null;
+ },
}
</script>
@@ -19,5 +38,14 @@
.map-container {
width: 100%;
height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ z-index: 0;
+
+ .world {
+ width: 100%;
+ height: 100%;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0