ZaiZai 11 kuukautta sitten
vanhempi
commit
7aaa575e37
1 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 6 1
      src/views/home/components/gui.vue

+ 6 - 1
src/views/home/components/gui.vue

@@ -14,7 +14,7 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { onMounted, ref, watch } from 'vue'
+import { onMounted, onUnmounted, ref, watch } from 'vue'
 import guiView from './gui/guigui.vue'
 import guiView from './gui/guigui.vue'
 import bookView from './gui/book.vue'
 import bookView from './gui/book.vue'
 import queryApi from '~api/using/query'
 import queryApi from '~api/using/query'
@@ -107,6 +107,11 @@ const getDomStyle = (id) => {
         return { width: 0, height: 0 }
         return { width: 0, height: 0 }
     }
     }
 }
 }
+
+//销毁
+onUnmounted(() => {
+    window.removeEventListener('resize', resizeEvent)
+})
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">