Przeglądaj źródła

Merge branch 'master' of http://192.168.0.115:3000/renyicun/NanjingMuseumWuJinZang-PC

aamin 1 rok temu
rodzic
commit
8f77992cec

+ 1 - 1
src/App.vue

@@ -67,7 +67,7 @@ textarea {
 // 字体
 @font-face {
   font-family: 'KingHwa_OldSong';
-  src: url('@/assets/style/KingHwa_OldSong.ttf');
+  src: url('@/assets/style/KingHwa_OldSong.TTF');
 }
 
 @font-face {

+ 9 - 3
src/components/PaintingDetailBox.vue

@@ -1,5 +1,5 @@
 <script setup>
-import { ref, onMounted, computed } from 'vue'
+import { ref, onMounted, computed, onBeforeUnmount } from 'vue'
 
 import { useRoute } from 'vue-router'
 
@@ -66,9 +66,12 @@ const mousemoveFu = (e, flag) => {
   }
 }
 
+let resizeObserver = null
+
 onMounted(() => {
   const element = document.querySelector('#myElement')
-  const resizeObserver = new ResizeObserver(entries => {
+
+  resizeObserver = new ResizeObserver(entries => {
     for (let entry of entries) {
       console.log(`Width changed to ${entry.contentRect.width}`)
       // 在这里执行你的逻辑
@@ -98,6 +101,7 @@ onMounted(() => {
         }
       }, 600)
       tiemrr.value = setInterval(() => {
+        console.log('interval')
         if (zhouMove.value >= 99) clearInterval(tiemrr.value)
         zhouMove.value = zhouMove.value + 1
       }, 30)
@@ -105,7 +109,9 @@ onMounted(() => {
   })
 
   resizeObserver.observe(element)
-
+})
+onBeforeUnmount(() => {
+  resizeObserver.disconnect()
 })
 </script>
 

+ 2 - 0
src/views/MoreContent.vue

@@ -483,10 +483,12 @@ onBeforeUnmount(() => {
           flex-direction: column;
           align-items: center;
           >img.splitter{
+            flex: 0 0 auto;
             width: 100%;
           }
           > button {
             .button-common-style();
+            flex: 0 0 auto;
             color: #b8ae7a;
           }
         }

+ 2 - 2
src/views/ShuangGou.vue

@@ -144,14 +144,14 @@ const isShowVideos = ref(false)
 function onClickHotspot(idx) {
   if (idx === 1) {
     router.push({
-      name: 'PaintingDetail',
+      name: 'PaintingDetailSimple',
       query: {
         idx: 20,
       }
     })
   } else if (idx === 2) {
     router.push({
-      name: 'PaintingDetail',
+      name: 'PaintingDetailSimple',
       query: {
         idx: 21,
       }