Explorar o código

Merge branch 'fine-music-score' into online

lex %!s(int64=2) %!d(string=hai) anos
pai
achega
0d31c2ca86
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/views/music/music-detail/download.tsx

+ 4 - 0
src/views/music/music-detail/download.tsx

@@ -23,10 +23,13 @@ export default defineComponent({
   },
   setup(props) {
     const list = ref(props.imgList)
+    const swipeRef = ref()
     watch(
       () => props.imgList,
       (val: any) => {
         list.value = val
+        acitveIndex.value = 0
+        if (swipeRef.value) swipeRef.value.swipeTo(0)
       }
     )
     const acitveIndex = ref(0)
@@ -82,6 +85,7 @@ export default defineComponent({
             <h2>{props.musicSheetName}</h2>
             <div class={styles.musicImg}>
               <Swipe
+                ref={swipeRef}
                 showIndicators={false}
                 loop={false}
                 onChange={(index: number) => {