需求:顶部导航栏
效果图:
wxml:
<!--导航条-->
<view class="navbar">
<text wx:for="{
{navbar}}" data-idx="{
{index}}" class="item {
{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap">{
{item}}</text>
</view>
<!--首页-->
<view hidden="{
{currentTab!==0}}">
tab_01
</view>
<!--搜索-->
<view hidden="{
{currentTab!==1}}">
tab_02
</view>
<!--我-->
<view hidden="{
{currentTab!==2}}">
tab_03
</view>
wxs

最低0.47元/天 解锁文章
8万+

被折叠的 条评论
为什么被折叠?



