index.wxml 2.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <view class="page">
  2. <view class="page__hd">
  3. <view class="page__title">SelectorGroup</view>
  4. <view class="page__desc">选择组</view>
  5. </view>
  6. <view class="page__bd page__bd_spacing">
  7. <view class="sub-title">简单 options</view>
  8. <wux-selector-group options="{{ stringOptions }}" defaultValue="{{ value1 }}" />
  9. <view class="sub-title">单选</view>
  10. <wux-selector-group options="{{ options }}" defaultValue="{{ value2 }}" />
  11. <view class="sub-title">多选</view>
  12. <wux-selector-group options="{{ options }}" defaultValue="{{ value3 }}" multiple />
  13. <view class="sub-title">可选 theme</view>
  14. <wux-selector-group theme="positive" options="{{ options }}" defaultValue="{{ value2 }}" />
  15. <view class="sub-title">两列布局</view>
  16. <wux-selector-group columns="2" options="{{ options }}" defaultValue="{{ value2 }}" />
  17. <view class="sub-title">禁用状态</view>
  18. <wux-selector-group options="{{ disabledOptions }}" defaultValue="{{ value2 }}" />
  19. <view class="sub-title">选项带描述</view>
  20. <wux-selector-group options="{{ descriptionOptions }}" defaultValue="{{ value2 }}" />
  21. <view class="sub-title">自定义 FieldName</view>
  22. <wux-selector-group options="{{ fieldNamesOptions }}" defaultValue="{{ value2 }}" defaultFieldNames="{{ fieldNames }}" />
  23. <view class="sub-title">圆角样式</view>
  24. <wux-selector-group options="{{ options }}" defaultValue="{{ value2 }}" shape="rounded" />
  25. <view class="sub-title">不显示对角</view>
  26. <wux-selector-group options="{{ options }}" defaultValue="{{ value2 }}" showCheckMark="{{ false }}" />
  27. <view class="sub-title">Controlled</view>
  28. <wux-selector-group options="{{ options }}" value="{{ value4 }}" controlled bind:change="onChange" />
  29. <view class="sub-title">必须选择一项</view>
  30. <wux-selector-group options="{{ options }}" value="{{ value5 }}" controlled bind:change="onRadioChange" />
  31. </view>
  32. </view>