card-mini/vant/dist/dropdown-menu/index.wxml

17 lines
716 B
Plaintext
Raw Normal View History

2021-06-22 16:14:04 +08:00
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
2021-09-01 16:55:20 +08:00
<view class="van-dropdown-menu van-dropdown-menu--top-bottom" style="height: 60rpx;">
<view wx:for="{{ itemListData }}" wx:key="index" data-index="{{ index }}"
class="{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}" bind:tap="onTitleTap">
2021-06-22 16:14:04 +08:00
<view
class="{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }}"
2021-09-01 16:55:20 +08:00
style="{{ item.showPopup ? 'color:' + activeColor : '' }}">
2021-06-22 16:14:04 +08:00
<view class="van-ellipsis">
{{ computed.displayTitle(item) }}
</view>
</view>
</view>
<slot />
2021-09-01 16:55:20 +08:00
</view>