15 lines
500 B
Plaintext
15 lines
500 B
Plaintext
<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>
|