tanzhongheY/custom-tab-bar/index.wxml

27 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-09-01 07:52:30 +00:00
<!--miniprogram/custom-tab-bar/index.wxml-->
<cover-view class="tab-bar-border">
<cover-view class="border">
2021-09-17 09:40:45 +00:00
2021-09-01 07:52:30 +00:00
</cover-view>
<cover-view class="tab-bar">
2021-09-17 09:40:45 +00:00
<cover-view class="tab-bar-item {{selected === 0 ? 'selected' : ''}}" data-path="{{list[0].pagePath}}"
data-index="0" bindtap="switchTab">
<cover-image style="width:40rpx; height: 40rpx"
src="{{selected === 0 ? list[0].selectedIconPath : list[0].iconPath}}"></cover-image>
<cover-view style="color: {{selected === 0 ? selectedColor : color}}">{{list[0].text}}</cover-view>
</cover-view>
<cover-view class="tab-bar-item middle {{selected === 2 ? 'selected' : ''}}" bindtap="switchTab" data-index="2"
data-path="{{list[2].pagePath}}">
<cover-image style="width:85rpx; height: 92rpx;"
src="{{selected === 2 ? '/img/nav/content.png' : '/img/nav/tzh_default.png'}}"></cover-image>
<cover-view style="color: {{selected === 2 ? selectedColor : color}}">{{list[2].text}}</cover-view>
</cover-view>
<cover-view class="tab-bar-item {{selected === 1 ? 'selected' : ''}}" data-path="{{list[1].pagePath}}"
data-index="1" bindtap="switchTab">
<cover-image style="width:40rpx; height: 40rpx"
src="{{selected === 1 ? list[1].selectedIconPath : list[1].iconPath}}"></cover-image>
<cover-view style="color: {{selected === 1 ? selectedColor : color}}">{{list[1].text}}</cover-view>
</cover-view>
2021-09-01 07:52:30 +00:00
</cover-view>
</cover-view>