Skip to content

Commit

Permalink
add: swiper增加双向绑定
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Dec 17, 2024
1 parent 8f88c15 commit e2dab59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/uni_modules/uview-plus/components/u-swiper/u-swiper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
this.currentIndex = val; // 和上游数据关联上
}
},
emits: ["click", "change"],
emits: ["click", "change", "update:current"],
computed: {
itemStyle() {
return index => {
Expand Down Expand Up @@ -189,6 +189,7 @@
} = e.detail
this.pauseVideo(this.currentIndex)
this.currentIndex = current
this.$emit('update:current', this.currentIndex)
this.$emit('change', e.detail)
},
// 切换轮播时,暂停视频播放
Expand Down

0 comments on commit e2dab59

Please sign in to comment.