|
@@ -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) => {
|