From ea91e87eae0cc1c07f3ecf7eec66806ce77fc50d Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 17 十月 2025 13:39:05 +0800
Subject: [PATCH] 首页问题
---
src/views/screen/components/screen-map-three/index.vue | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/src/views/screen/components/screen-map-three/index.vue b/src/views/screen/components/screen-map-three/index.vue
index a117a58..f500e99 100644
--- a/src/views/screen/components/screen-map-three/index.vue
+++ b/src/views/screen/components/screen-map-three/index.vue
@@ -1,5 +1,5 @@
<template>
- <div class="map-container" >
+ <div class="map-container">
<canvas class="world" ref="worldContainer"></canvas>
</div>
</template>
@@ -9,20 +9,43 @@
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 Experience(this.$refs.worldContainer);
- }
+
+ },
+ beforeDestroy() {
+ world.destroy();
+ world = null;
+ },
}
</script>
<style lang="scss" scoped>
.map-container {
width: 100%;
- height: 100%;
- position: absolute;
- left: 0;
- top: 0;
+ height:100%;
+ // position: absolute;
+ // left: 25%;
+ // top: 65px;
z-index: 0;
+ // background: url("../../../../assets/images/screen/cardBg.png");
+ // background-size: cover !important;
+ // background-repeat: no-repeat !important;
+ // background-position: center center !important;
.world {
width: 100%;
height: 100%;
--
Gitblit v1.8.0