You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
840 B
24 lines
840 B
<wxs src="../common/utils.wxs" module="_" />
|
|
|
|
<view style="{{_._style([style, customStyle])}}" class="{{ classPrefix }} class {{prefix}}-class" id="t-bar">
|
|
<view
|
|
wx:for="{{menus}}"
|
|
wx:key="index"
|
|
bindtap="handleToggle"
|
|
data-index="{{index}}"
|
|
class="{{_.cls(classPrefix + '__item', [['active', activeIdx == index], ['disabled', item.disabled]])}} {{prefix}}-class-item"
|
|
aria-disabled="{{item.disabled}}"
|
|
aria-role="button"
|
|
aria-expanded="{{activeIdx === index}}"
|
|
aria-haspopup="menu"
|
|
>
|
|
<view class="{{classPrefix}}__title {{prefix}}-class-label">{{item.label}}</view>
|
|
<t-icon
|
|
name="caret-down-small"
|
|
t-class="{{classPrefix}}__icon {{classPrefix}}__icon--{{activeIdx == index ? 'active' : ''}} {{prefix}}-class-icon"
|
|
aria-hidden="{{true}}"
|
|
/>
|
|
</view>
|
|
<slot />
|
|
</view>
|