修改颜色轮播图改变
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
class="swiper"
|
||||
:circular="true"
|
||||
:indicator-dots="false"
|
||||
:current="current"
|
||||
@change="onChange"
|
||||
>
|
||||
<swiper-item v-for="(item, index) in images" :key="index">
|
||||
@@ -40,6 +41,12 @@ export default {
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
images() {
|
||||
// 切换图片数组时重置指示点到第一张
|
||||
this.current = 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.current = e.detail.current
|
||||
|
||||
Reference in New Issue
Block a user