From 455b032ba210f3a3355a7ecdc577d030943d46d5 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期日, 28 四月 2024 17:11:24 +0800
Subject: [PATCH] fix:修改点位管理
---
src/views/screen/components/screen-map-three/index.vue | 46 ++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/src/views/screen/components/screen-map-three/index.vue b/src/views/screen/components/screen-map-three/index.vue
index aae98bf..806fa3e 100644
--- a/src/views/screen/components/screen-map-three/index.vue
+++ b/src/views/screen/components/screen-map-three/index.vue
@@ -1,13 +1,51 @@
<template>
- <div>
- 123
+ <div class="map-container">
+ <canvas class="world" ref="worldContainer"></canvas>
</div>
</template>
<script>
+import Experience from './experience/index';
+let world = null;
export default {
- name: 'ScreenMapThree'
+ name: 'ScreenMapThree',
+ props: {
+ loadEnd: {
+ type: Boolean,
+ default: false
+ },
+ },
+ watch: {
+ loadEnd: {
+ handler(newVal) {
+ if (newVal) {
+ world = new Experience(this.$refs.worldContainer);
+ }
+ }
+ }
+ },
+ mounted() {
+
+ },
+ beforeDestroy() {
+ world.destroy();
+ world = null;
+ },
}
</script>
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped>
+.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