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> @@ -18,15 +18,19 @@ watch: { loadEnd: { handler(newVal) { console.log(newVal); if(newVal) { if (newVal) { world = new Experience(this.$refs.worldContainer); } } } }, mounted() { } }, beforeDestroy() { world.destroy(); world = null; }, } </script> @@ -38,6 +42,7 @@ left: 0; top: 0; z-index: 0; .world { width: 100%; height: 100%;