1
This commit is contained in:
23
custom-tab-bar/index.wxml
Normal file
23
custom-tab-bar/index.wxml
Normal file
@@ -0,0 +1,23 @@
|
||||
<view class="tab-bar">
|
||||
<view
|
||||
wx:for="{{list}}"
|
||||
wx:key="index"
|
||||
class="tab-item {{selected === index ? 'active' : ''}}"
|
||||
data-path="{{item.pagePath}}"
|
||||
data-index="{{index}}"
|
||||
bindtap="switchTab"
|
||||
>
|
||||
<!-- Emoji图标 -->
|
||||
<view class="tab-emoji {{selected === index ? 'emoji-bounce' : ''}}">
|
||||
{{item.emoji}}
|
||||
</view>
|
||||
|
||||
<!-- 文字标签 -->
|
||||
<view class="tab-text" style="color: {{selected === index ? selectedColor : color}}">
|
||||
{{item.text}}
|
||||
</view>
|
||||
|
||||
<!-- 选中指示器 -->
|
||||
<view class="tab-indicator" wx:if="{{selected === index}}"></view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user