index.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <view class="wux-class {{ classes.wrap }}">
  2. <view class="{{ classes.hd }}">
  3. <wux-tabs
  4. controlled
  5. current="{{ activeIndex + '' }}"
  6. theme="assertive"
  7. justify="flex-start"
  8. bind:change="onTabsChange"
  9. data-active-index="{{ activeIndex + '' }}"
  10. wx:if="{{ activeOptions.length }}"
  11. >
  12. <block wx:for="{{ activeOptions }}" wx:key="index">
  13. <wux-tab key="{{ index + '' }}" title="{{ item[fieldNames.label] + '' }}"></wux-tab>
  14. </block>
  15. </wux-tabs>
  16. </view>
  17. <view class="{{ classes.bd }}" style="{{ bodyStyle }}">
  18. <block wx:for="{{ showOptions }}" wx:for-item="option" wx:for-index="optionIndex" wx:key="optionIndex" wx:if="{{ showOptions.length }}">
  19. <view class="{{ classes.innerScroll }}">
  20. <scroll-view scroll-y class="wux-scroll-view-class {{ classes.scrollView }}" style="{{ scrollViewStyle }}">
  21. <wux-radio-group
  22. data-option-index="{{ optionIndex }}"
  23. value="{{ activeValue[optionIndex] || '' }}"
  24. bodyStyle="{{ { backgroundColor: 'unset' } }}"
  25. bind:change="onItemSelect"
  26. wx:if="{{ option.length }}"
  27. >
  28. <block wx:for="{{ common.getOptions(option, fieldNames) }}" wx:key="__comp_unique_key">
  29. <wux-radio
  30. color="assertive"
  31. title="{{ item[fieldNames.label] + '' }}"
  32. value="{{ item[fieldNames.value] + '' }}"
  33. disabled="{{ !!item[fieldNames.disabled] }}"
  34. />
  35. </block>
  36. </wux-radio-group>
  37. </scroll-view>
  38. </view>
  39. </block>
  40. </view>
  41. </view>
  42. <wxs src="../helpers/wxs/common.wxs" module="common" />