radio-group.wxml 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class" aria-role="radiogroup">
  3. <slot />
  4. <block wx:for="{{radioOptions}}" wx:key="value">
  5. <t-radio
  6. class="{{prefix}}-radio-option"
  7. data-index="{{index}}"
  8. data-value="{{item.value}}"
  9. data-allow-uncheck="{{item.allowUncheck || allowUncheck}}"
  10. block="{{item.block || true}}"
  11. label="{{item.label || ''}}"
  12. value="{{item.value}}"
  13. checked="{{item.checked || false}}"
  14. content="{{item.content || ''}}"
  15. allow-uncheck="{{item.allowUncheck || allowUncheck}}"
  16. content-disabled="{{item.contentDisabled || false}}"
  17. readonly="{{item.readonly || false}}"
  18. disabled="{{item.disabled || false}}"
  19. icon="{{item.icon || icon}}"
  20. placement="{{item.placement || placement}}"
  21. max-content-row="{{item.maxContentRow || 5}}"
  22. max-label-row="{{item.maxLabelRow || 3}}"
  23. name="{{item.name || ''}}"
  24. borderless="{{borderless}}"
  25. bind:change="handleRadioChange"
  26. />
  27. </block>
  28. </view>