From ea2512d755213274a2f92a4f701ee87c2582c142 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Fri, 30 Jun 2023 20:53:43 +0800 Subject: [PATCH] swiper update --- pages/component/swiper/swiper.uvue | 46 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/pages/component/swiper/swiper.uvue b/pages/component/swiper/swiper.uvue index 3c389646..cf3819a0 100644 --- a/pages/component/swiper/swiper.uvue +++ b/pages/component/swiper/swiper.uvue @@ -2,14 +2,14 @@ - - + + A - + B - + C @@ -35,7 +35,18 @@ 定制指示器颜色 - + + 纵向 + + + + 指定current为最后一个元素 + + + + 指定current-item-id为最后一个元素 + + @@ -52,9 +63,14 @@ autoplaySelect:false, circularSelect:false, indicatorColorSelect:false, + verticalSelect:false, + currentSelect:false, + currentItemIdSelect:false, intervalSelect:1000, indicatorColor:"", indicatorColorActive:"", + currentVal:0, + currentItemIdVal:"" } }, methods: { @@ -64,6 +80,26 @@ autoplayChange: function (e : SwitchChangeEvent) { this.autoplaySelect = e.detail.value }, + verticalChange: function (e : SwitchChangeEvent) { + this.verticalSelect = e.detail.value + }, + currentItemIdChange: function (e : SwitchChangeEvent) { + this.currentItemIdSelect = e.detail.value + if(this.currentItemIdSelect){ + this.currentItemIdVal = 'C' + }else{ + this.currentItemIdVal = 'A' + } + }, + currentChange: function (e : SwitchChangeEvent) { + this.currentSelect = e.detail.value + if(this.currentSelect){ + this.currentVal = 2 + }else{ + this.currentVal = 0 + } + + }, circularChange: function (e : SwitchChangeEvent) { this.circularSelect = e.detail.value console.log(this.circularSelect) -- GitLab