From dc06dd5c59aac9e1103c955022cdd5a64181408e Mon Sep 17 00:00:00 2001 From: duqingquan Date: Sat, 1 Jul 2023 17:50:20 +0800 Subject: [PATCH] =?UTF-8?q?swiper=20=E7=A4=BA=E4=BE=8B=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/swiper/swiper.uvue | 37 +++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/pages/component/swiper/swiper.uvue b/pages/component/swiper/swiper.uvue index cf3819a0..cdcf78c7 100644 --- a/pages/component/swiper/swiper.uvue +++ b/pages/component/swiper/swiper.uvue @@ -2,7 +2,7 @@ - + A @@ -47,7 +47,14 @@ 指定current-item-id为最后一个元素 - + + 禁止用户 touch 操作 + + + + swiperTransition 是否打印 + + @@ -70,19 +77,43 @@ indicatorColor:"", indicatorColorActive:"", currentVal:0, - currentItemIdVal:"" + currentItemIdVal:"", + disableTouchSelect:false, + swiperTransitionSelect:false } }, methods: { + + swiperChange: function (e : SwiperChangeEvent) { + console.log("swiperChange") + console.log(e) + }, + swiperTransition: function (e : SwiperTransitionEvent) { + if(this.swiperTransitionSelect){ + console.log("swiperTransition") + console.log(e) + } + }, + swiperAnimationfinish: function (e : SwiperAnimationFinishEvent) { + console.log("swiperAnimationfinish") + console.log(e) + }, + dotsChange: function (e : SwitchChangeEvent) { this.dotsSelect = e.detail.value }, + swiperTransitionChange: function (e : SwitchChangeEvent) { + this.swiperTransitionSelect = e.detail.value + }, autoplayChange: function (e : SwitchChangeEvent) { this.autoplaySelect = e.detail.value }, verticalChange: function (e : SwitchChangeEvent) { this.verticalSelect = e.detail.value }, + disableTouchChange: function (e : SwitchChangeEvent) { + this.disableTouchSelect = e.detail.value + }, currentItemIdChange: function (e : SwitchChangeEvent) { this.currentItemIdSelect = e.detail.value if(this.currentItemIdSelect){ -- GitLab