|
[BUG]
ios端 swiper current设置无效
[复制链接]
<swiper class="swiper_box" :current="this.data.index" onchange={this.onchange}>
data(){return {index: 0,}} // 下标
// 点击弹框中的题号 跳转到指定题目
toTopicTi(item) {
this.data.index = item.showIndex-1
this.onchange(this.data.index)
},
// 左右切换,更改下标
onchange(index) {
// 切换下标
if (index != 0 && index.detail != undefined) {
this.data.index = index.detail.current;
console.log('滑动:' + this.data.index);
} else if (index != 0) {
this.data.index = index
console.log('答题卡:' + this.data.index);
}
}
|
|