index.wxml 718 B

1234567891011121314151617181920212223
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <wxs src="./index.wxs" module="computed" />
  3. <view class="van-dropdown-menu van-dropdown-menu--top-bottom">
  4. <view
  5. wx:for="{{ itemListData }}"
  6. wx:key="index"
  7. data-index="{{ index }}"
  8. class="{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}"
  9. bind:tap="onTitleTap"
  10. >
  11. <view
  12. class="{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }}"
  13. style="{{ item.showPopup ? 'color:' + activeColor : '' }}"
  14. >
  15. <view class="van-ellipsis">
  16. {{ computed.displayTitle(item) }}
  17. </view>
  18. </view>
  19. </view>
  20. <slot />
  21. </view>