water_xcx/miniprogram_npm/tdesign-miniprogram/radio/README.en-US.md

47 lines
1.8 KiB
Markdown
Raw Permalink Normal View History

2025-04-15 15:44:51 +08:00
:: BASE_DOC ::
## API
### Radio Props
name | type | default | description | required
-- | -- | -- | -- | --
align | String | left | optionsleft/right | N
allow-uncheck | Boolean | false | \- | N
checked | Boolean | false | \- | N
default-checked | Boolean | undefined | uncontrolled property | N
color | String | #0052d9 | \- | N
content | String / Slot | - | \- | N
content-disabled | Boolean | - | \- | N
disabled | Boolean | undefined | \- | N
external-classes | Array | - | `['t-class', 't-class-icon', 't-class-label', 't-class-content', 't-class-border']` | N
icon | String / Array | 'fill-circle' | Typescript`'fill-circle' | 'stroke-line' | Array<string>` | N
label | String / Slot | - | \- | N
max-content-row | Number | 5 | \- | N
max-label-row | Number | 3 | \- | N
name | String | - | \- | N
value | String / Number / Boolean | false | Typescript`T` | N
### Radio Events
name | params | description
-- | -- | --
change | `(checked: boolean)` | \-
### RadioGroup Props
name | type | default | description | required
-- | -- | -- | -- | --
align | String | left | optionsleft/right | N
disabled | Boolean | undefined | \- | N
icon | String / Array | 'fill-circle' | Typescript`'fill-circle' | 'stroke-line' | Array<string>` | N
name | String | - | \- | N
options | Array | - | Typescript`Array<RadioOption>` `type RadioOption = string | number | RadioOptionObj` `interface RadioOptionObj { label?: string; value?: string | number; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/radio-group/type.ts) | N
value | String / Number / Boolean | - | Typescript`T` | N
default-value | String / Number / Boolean | undefined | uncontrolled property。Typescript`T` | N
### RadioGroup Events
name | params | description
-- | -- | --
change | `(value: T)` | \-