index.wxml 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. <wux-popup position="bottom" visible="{{ visible }}" bind:close="onPopupClose">
  2. <view class="wux-class {{ classes.wrap }}">
  3. <view class="{{ classes.hd }}">
  4. <view class="{{ classes.title }}" wx:if="{{ title }}">{{ title }}</view>
  5. <view class="{{ classes.menus }}" wx:if="{{ activeOptions.length }}">
  6. <block wx:for="{{ activeOptions }}" wx:key="">
  7. <view class="{{ classes.menu }} {{ activeIndex === index ? prefixCls + '__menu--active' : '' }}" data-menu-index="{{ index }}" bindtap="onMenuClick">{{ item[fieldNames['label']] }}</view>
  8. </block>
  9. </view>
  10. </view>
  11. <view class="{{ classes.bd }}" style="{{ bodyStyle }}">
  12. <block wx:for="{{ showOptions }}" wx:for-item="option" wx:for-index="optionIndex" wx:key="">
  13. <view class="{{ classes.inner }}">
  14. <scroll-view scroll-y class="wux-scroll-view-class {{ classes.scrollView }}">
  15. <view class="{{ classes.option }}">
  16. <block wx:for="{{ option }}" wx:key="">
  17. <view
  18. class="{{ classes.item }} {{ activeValue[optionIndex] === item[fieldNames['value']] ? prefixCls + '__item--active' : '' }} {{ item.disabled ? prefixCls + '__item--disabled' : '' }}"
  19. data-option-index="{{ optionIndex }}"
  20. data-item="{{ item }}"
  21. bindtap="onItemSelect"
  22. >
  23. <text>{{ item[fieldNames['label']] }}</text>
  24. <icon class="{{ classes.icon }}" type="success_no_circle" size="16" color="#ef473a" wx:if="{{ activeValue[optionIndex] === item[fieldNames['value']] }}" />
  25. </view>
  26. </block>
  27. </view>
  28. </scroll-view>
  29. </view>
  30. </block>
  31. </view>
  32. </view>
  33. </wux-popup>