peng
2025-11-06 c4938f6f4e839890b032c75c7a57333a6a9157a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<view class="tab-bar">
  <view 
    wx:for="{{ list }}" 
    wx:key="index" 
    class="tab-bar-item {{ active === index ? 'active' : '' }}"
    bindtap="switchTab"
    data-index="{{ index }}"
  >
    <view class="tab-bar-icon">
      <text class="icon {{ item.iconName }}"></text>
    </view>
    <view class="tab-bar-text">{{ item.text }}</view>
  </view>
</view>