這篇文章主要講解了“微信小程序怎么實(shí)現(xiàn)YDUI的ScrollTab組件”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“微信小程序怎么實(shí)現(xiàn)YDUI的ScrollTab組件”吧!
在昌黎等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供做網(wǎng)站、網(wǎng)站建設(shè) 網(wǎng)站設(shè)計制作按需定制開發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),高端網(wǎng)站設(shè)計,成都營銷網(wǎng)站建設(shè),外貿(mào)營銷網(wǎng)站建設(shè),昌黎網(wǎng)站建設(shè)費(fèi)用合理。WXML
<!--導(dǎo)航 --> <view class="tui-fixed-left"> <scroll-view class="tui-city-scroll" scroll-x="true"> <text bindtap="getStatus" id="NAV{{index}}" class="tui-nav-li {{index === status ? 'tui-nav-active' : ''}}" data-index="{{index}}" wx:for="{{navList}}">{{item}}</text> </scroll-view> </view> <!--列表滾動區(qū) --> <view class="tui-fixed-y"> <scroll-view class="tui-city-scroll-y" scroll-y="true" scroll-into-view="NAV{{status}}" scroll-with-animation="true"> <view wx:for="{{navList}}"> <view id="NAV{{index}}" class="tui-list-head">{{item}}</view> <view class="tui-list-li">{{item}} 列表 {{index}}</view> </view> </scroll-view> </view>
WXSS
.tui-fixed-x{ margin-left: 130px; position: fixed; top: 0; left: 0; } .tui-fixed-left{ width: 120px; height: 100%; border-right: 1px solid #dfdfdf; position: fixed; background-color: #f5f5f5; top: 0; left: 0; } .tui-list-head{ background-color: #fff; margin-bottom: 15px; } .tui-city-scroll{ width: 100%; } .tui-nav-li{ font-size: 30rpx; padding: 0 10px; height: 100rpx; line-height: 100rpx; width: 100px; display: block; border-bottom: 1px solid #dfdfdf; position: relative; z-index: 10; } .tui-nav-active{ background-color: #fff; } .tui-fixed-y{ margin-left: 120px; padding-left: 10px; padding-right: 10px; height: 100%; position: fixed; bottom: 0; right: 0; } .tui-city-scroll-y{ height: 100%; box-sizing: border-box; } .tui-list-head{ height: 50px; line-height: 50px; text-align: center; font-size: 30rpx; color: blue; } .tui-list-li{ height: 400px; padding: 10rpx; color: #fff; font-size: 50rpx; background-color: lightgreen; }
JS
Page({ data: { navList: ['今日特惠', '煙灶推薦', '凈水飲水推薦', '洗碗機(jī)推薦', '電熱推薦', '燃熱推薦', '消毒柜推薦', '嵌入式推薦', '商用電器', '活動說明'], status: 0 }, getStatus(e) { this.setData({ status: e.currentTarget.dataset.index }) } })
感謝各位的閱讀,以上就是“微信小程序怎么實(shí)現(xiàn)YDUI的ScrollTab組件”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對微信小程序怎么實(shí)現(xiàn)YDUI的ScrollTab組件這一問題有了更深刻的體會,具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián)網(wǎng)站建設(shè)公司,,小編將為大家推送更多相關(guān)知識點(diǎn)的文章,歡迎關(guān)注!
分享題目:微信小程序怎么實(shí)現(xiàn)YDUI的ScrollTab組件-創(chuàng)新互聯(lián)
文章起源:http://aaarwkj.com/article42/jcshc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App設(shè)計、商城網(wǎng)站、網(wǎng)站導(dǎo)航、小程序開發(fā)、網(wǎng)站改版、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)