diff --git a/pages/component/swiper/swiper.uvue b/pages/component/swiper/swiper.uvue index 3c389646dcb31a38e4f87cfda016772ed9b83e8f..cf3819a0bf5307a6914091c347a9e8c0d37b8830 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)