-
-
![]()
+
+
+
![]()
+
-
@@ -33,10 +35,11 @@
}
})
- const activeUrl = ref('')
-
+ //激活图片下标
+ const activeUrl = ref(0)
+
const init = () => {
- activeUrl.value = props.urlList ? props.urlList[0] : ''
+
}
init()
@@ -44,6 +47,15 @@
activeUrl.value = val
}
+ const changeActive = (val) => {
+ activeUrl.value = activeUrl.value + val
+ if(activeUrl.value < 0){
+ activeUrl.value = 0
+ }else if(activeUrl.value == props.urlList?.length){
+ activeUrl.value = props.urlList.length - 1
+ }
+ }
+