最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

微信小程序?qū)崿F(xiàn)導(dǎo)航欄選項(xiàng)卡效果

 更新時(shí)間:2020年06月19日 15:01:20   作者:Rattenking  
這篇文章主要為大家詳細(xì)介紹了微信小程序?qū)崿F(xiàn)導(dǎo)航欄選項(xiàng)卡效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了微信小程序?qū)崿F(xiàn)MUI頂部選項(xiàng)卡的具體代碼,供大家參考,具體內(nèi)容如下

DEMO下載

效果圖

WXML

<import src="../../template/list.wxml"/>

<view class="tui-tabbar-content">
 <view class="tui-tabbar-group">
 <text data-id="0" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 0 ? 'tui-active' : ''}}">已獲得賞金</text>
 <text data-id="1" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 1 ? 'tui-active' : ''}}">賞金在路上</text>
 <text data-id="2" bindtap="changeTabbar" class="tui-tabbar-cell {{index == 2 ? 'tui-active' : ''}}">邀請(qǐng)失敗</text>
 </view>
</view>
<view class="tui-list-box {{index == 0 ? '' : 'tui-hide'}}">
 <template wx:for="{{['選項(xiàng)卡一子選項(xiàng) - 1','選項(xiàng)卡一子選項(xiàng) - 2','選項(xiàng)卡一子選項(xiàng) - 3','選項(xiàng)卡一子選項(xiàng) - 4','選項(xiàng)卡一子選項(xiàng) - 5','選項(xiàng)卡一子選項(xiàng) - 6','選項(xiàng)卡一子選項(xiàng) - 7','選項(xiàng)卡一子選項(xiàng) - 8']}}" is="listNoneOnly" data="{{item}}"></template>
</view>
<view class="tui-list-box {{index == 1 ? '' : 'tui-hide'}}">
 <template wx:for="{{['選項(xiàng)卡二子選項(xiàng) - 1','選項(xiàng)卡二子選項(xiàng) - 2','選項(xiàng)卡二子選項(xiàng) - 3','選項(xiàng)卡二子選項(xiàng) - 4','選項(xiàng)卡二子選項(xiàng) - 5']}}" is="listNoneOnly" data="{{item}}"></template>
</view>
<view class="tui-list-box {{index == 2 ? '' : 'tui-hide'}}">
 <template wx:for="{{['選項(xiàng)卡三子選項(xiàng) - 1','選項(xiàng)卡三子選項(xiàng) - 2','選項(xiàng)卡三子選項(xiàng) - 3']}}" is="listNoneOnly" data="{{item}}"></template>
</view>

WXSS

page{background-color: #efeff4;}
.tui-tabbar-content{
 padding: 10px;
}
.tui-tabbar-group{
 border: 1px solid #4cd964;
 border-radius: 3px;
 overflow: hidden;
 width: 100%;
 display: table;
 table-layout: fixed;
 color: #4cd964;
}
.tui-tabbar-cell{
 display: table-cell;
 width: 100%;
 height: 80rpx;
 line-height: 80rpx;
 font-size: 35rpx;
 text-align: center;
}
.tui-tabbar-cell:not(:last-child){border-right: 1px solid #4cd964;}
.tui-tabbar-cell.tui-active{background-color: #4cd964;color: #fff;}

.tui-list-box{border-top:1px solid #c8c7cc;}

JS

Page({
 data: {
 index: 0
 },
 changeTabbar(e){
 this.setData({ index: e.currentTarget.dataset.id})
 }
})

總結(jié)

微信小程序的切換,采用的是對(duì)某一個(gè)值的判斷,來對(duì)列表和tab bar進(jìn)行切換!

如果大家還想深入學(xué)習(xí),可以點(diǎn)擊兩個(gè)精彩的專題:javascript選項(xiàng)卡操作方法匯總 jquery選項(xiàng)卡操作方法匯總

為大家推薦現(xiàn)在關(guān)注度比較高的微信小程序教程一篇:《微信小程序開發(fā)教程》小編為大家精心整理的,希望喜歡。

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論

湘潭市| 蒲城县| 府谷县| 噶尔县| 龙山县| 福海县| 清新县| 博客| 沽源县| 富锦市| 赤水市| 东光县| 读书| 鸡泽县| 岢岚县| 滦南县| 博乐市| 贡山| 马边| 固阳县| 澎湖县| 沧州市| 景宁| 定日县| 堆龙德庆县| 宁津县| 沈丘县| 绵竹市| 东安县| 上杭县| 玉龙| 宁陵县| 南陵县| 英吉沙县| 望江县| 怀来县| 花垣县| 三都| 胶州市| 正镶白旗| 广安市|