導航:首頁 > 編程語言 > 小程序左右滑動導航

小程序左右滑動導航

發布時間:2023-08-17 07:06:25

1. 微信程序滑動右側滾動軸的時候,左側的樣式怎樣跟著改變

學小程序時寫過一個B站demo,也遇到此問題,最後自定義Swiper的Dot來實現了。
思路是:用view組件重寫dot,給swiper組件綁定bindchange事件用來獲取當前第幾個dot,動態改變class。

<!-- 滾動廣告 begin -->
<view class="slider-wrapper">
<swiper bindchange="swiperChange" indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}" interval="{{interval}}" ration="{{ration}}">
<block wx:for="{{imgUrls}}" wx:key="*this">
<swiper-item>
<image src="{{item}}" class="slide-image"/>
</swiper-item>
</block>
</swiper>
<view class="swipe-btn-wrapper">
<view class="swipe-btn-list">
<view class="{{dotsClass[0]}}"></view>
<view class="{{dotsClass[1]}}"></view>
<view class="{{dotsClass[2]}}"></vi

閱讀全文

與小程序左右滑動導航相關的資料

熱點內容
pic編程哪裡下載 瀏覽:549
蘋果ipad官方壁紙 瀏覽:154
華創網路信號怎麼樣 瀏覽:495
共享單車網站源碼 瀏覽:281
a班練琴app下載不了怎麼回事 瀏覽:349
數控中怎麼編程 瀏覽:409
vm如何安裝linux系統 瀏覽:423
歌手實績數據在哪裡看 瀏覽:691
代碼002 瀏覽:714
jdk如何編譯java文件 瀏覽:900
修改iptables配置文件 瀏覽:427
word自動保存指定文件夾 瀏覽:18
電腦畫質不清晰win10 瀏覽:912
diskgen使用教程 瀏覽:970
常州數控車編程培訓哪裡有 瀏覽:44
如何升級晴明等級 瀏覽:347
開頭是什麼文件 瀏覽:645
linux16進制看elf文件 瀏覽:663
紙檔文件怎麼能變成excel檔 瀏覽:481
迅雷下載總出現jsp 瀏覽:150

友情鏈接