<template>
<swiper :style="450rpx" :current="swiperCurrentIndex" @change="swiperChange">
<swiper-item>
1
<swiper-item>
<swiper-item>
2
<swiper-item>
</swiper>
</template>
<script>
export default {
data() {
return {
swiperCurrentIndex: 0,
}
},
methods:{
swiperChange(res){
console.log(res)
}
},
onLoad(opt) {
this.swiperCurrentIndex=1;
}
}
</script>
onLoad触发时候 swiperCurrentIndex变化 swiperChange没有触发 微信小程序能触发 行为不一致
3 个回复
GUNDAM (作者)
顶上去
1***@163.com
后来你是怎么解决的
w***@163.com
解决了吗