Files
wxapp_escort/custom-tab-bar/index.wxml
T
2026-11-03 16:15:41 +08:00

15 lines
500 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="tab-bar">
<view
class="tab-item {{ selected === index ? 'is-active' : '' }}"
wx:for="{{ list }}"
wx:key="pagePath"
data-index="{{ index }}"
data-path="{{ item.pagePath }}"
bindtap="onTap"
>
<!-- 三个 tab 都是自绘圆润 SVG(.tab-icon),不引 t-icon,冷启动无需注入图标字体 -->
<view class="tab-icon {{ item.cls }} {{ selected === index ? 'on' : '' }}"></view>
<text class="tab-text">{{ item.text }}</text>
</view>
</view>