|
15 | 15 |
|
16 | 16 | <p align="center"><a href="./README.md">English</a> | 简体中文</p> |
17 | 17 |
|
18 | | - |
19 | 18 | ## 特性 |
20 | 19 |
|
21 | 20 | - 支持字符串、数字和带标签的选项记录。 |
@@ -63,35 +62,35 @@ npm start |
63 | 62 |
|
64 | 63 | ### Segmented |
65 | 64 |
|
66 | | -| 名称 | 类型 | 默认值 | 说明 | |
67 | | -| --- | --- | --- | --- | |
68 | | -| `className` | string | `''` | 附加className。 | |
69 | | -| `classNames` | 部分<记录<'项目'\| '标签',字符串>> | - | 内部插槽的语义化 className。 | |
70 | | -| `defaultValue` | string \| number | 第一个选项值 | 初始选中值。 | |
71 | | -| `direction` | `'ltr'` \| `'rtl'` | - | Layout direction. | |
72 | | -| `disabled` | boolean | false | 禁用所有选项。 | |
73 | | -| `itemRender` | `(node: ReactNode, info: { item: SegmentedLabeledOption }) => ReactNode` | identity | 自定义选项项渲染器。 | |
74 | | -| `motionName` | string | `'thumb-motion'` | 活动拇指的运动className称。 | |
75 | | -| `name` | string | - | Radio group name. | |
76 | | -| `onChange` | `(value: string \| number) => void` | - | 当所选值更改时触发。 | |
77 | | -| `options` | Array<string \| number \| SegmentedLabeledOption> | - | 可用选项,必填。 | |
78 | | -| `prefixCls` | string | `'rc-segmented'` | 前缀className。 | |
79 | | -| `style` | React.CSSProperties | - | 根样式。 | |
80 | | -| `styles` | 部分<记录<'项目'\| '标签',React.CSSProperties>> | - | 内部插槽的语义化样式。 | |
81 | | -| `value` | string \| number | - | 受控选中值。 | |
82 | | -| `vertical` | boolean | false | 垂直渲染选项。 | |
| 65 | +| 名称 | 类型 | 默认值 | 说明 | |
| 66 | +| -------------- | ------------------------------------------------------------------------ | ---------------- | ---------------------------- | |
| 67 | +| `className` | string | `''` | 附加className。 | |
| 68 | +| `classNames` | Partial<Record<'item' \| 'label', string>> | - | 内部插槽的语义化 className。 | |
| 69 | +| `defaultValue` | string \| number | 第一个选项值 | 初始选中值。 | |
| 70 | +| `direction` | `'ltr'` \| `'rtl'` | - | Layout direction. | |
| 71 | +| `disabled` | boolean | false | 禁用所有选项。 | |
| 72 | +| `itemRender` | `(node: ReactNode, info: { item: SegmentedLabeledOption }) => ReactNode` | identity | 自定义选项项渲染器。 | |
| 73 | +| `motionName` | string | `'thumb-motion'` | 活动拇指的运动className称。 | |
| 74 | +| `name` | string | - | Radio group name. | |
| 75 | +| `onChange` | `(value: string \| number) => void` | - | 当所选值更改时触发。 | |
| 76 | +| `options` | Array<string \| number \| SegmentedLabeledOption> | - | 可用选项,必填。 | |
| 77 | +| `prefixCls` | string | `'rc-segmented'` | 前缀className。 | |
| 78 | +| `style` | React.CSSProperties | - | 根样式。 | |
| 79 | +| `styles` | Partial<Record<'item' \| 'label', React.CSSProperties>> | - | 内部插槽的语义化样式。 | |
| 80 | +| `value` | string \| number | - | 受控选中值。 | |
| 81 | +| `vertical` | boolean | false | 垂直渲染选项。 | |
83 | 82 |
|
84 | 83 | 其他合法的 `div` 属性会透传给根元素。 |
85 | 84 |
|
86 | 85 | ### SegmentedLabeledOption |
87 | 86 |
|
88 | | -| 名称 | 类型 | 默认值 | 说明 | |
89 | | -| --- | --- | --- | --- | |
90 | | -| `className` | string | - | 选项className称。 | |
91 | | -| `disabled` | boolean | false | 禁用此选项。 | |
92 | | -| `label` | ReactNode | - | 展示的选项内容。 | |
93 | | -| `title` | string | 源自标签 | 标签的原生标题。 | |
94 | | -| `value` | string \| number | - | 选项值。 | |
| 87 | +| 名称 | 类型 | 默认值 | 说明 | |
| 88 | +| ----------- | ---------------- | -------- | ----------------- | |
| 89 | +| `className` | string | - | 选项className称。 | |
| 90 | +| `disabled` | boolean | false | 禁用此选项。 | |
| 91 | +| `label` | ReactNode | - | 展示的选项内容。 | |
| 92 | +| `title` | string | 源自标签 | 标签的原生标题。 | |
| 93 | +| `value` | string \| number | - | 选项值。 | |
95 | 94 |
|
96 | 95 | ## 本地开发 |
97 | 96 |
|
|
0 commit comments