diff --git a/src/components/radio/index.en.md b/src/components/radio/index.en.md index 2d5594cf39..74037c8215 100644 --- a/src/components/radio/index.en.md +++ b/src/components/radio/index.en.md @@ -31,6 +31,7 @@ type RadioValue = string | number | icon | Customized `icon` icon | `(checked: boolean) => React.ReactNode` | - | | id | The id of the input element, often used in conjunction with the label | `string` | - | | onChange | Callback function when checked is changed | `(val: boolean) => void` | - | +| onClick | Radio's click event | `(event: React.MouseEvent) => void` | - | | value | Value is carrying identification, used in `Group` mode | `RadioValue` | - | ### Radio.Group diff --git a/src/components/radio/index.zh.md b/src/components/radio/index.zh.md index 33e6753ce6..b9d448e89c 100644 --- a/src/components/radio/index.zh.md +++ b/src/components/radio/index.zh.md @@ -31,6 +31,7 @@ type RadioValue = string | number | icon | 自定义 `icon` 图标 | `(checked: boolean) => React.ReactNode` | - | | id | `input` 元素的 `id`,常用来配合 `label` 使用 | `string` | - | | onChange | 变化时回调函数 | `(val: boolean) => void` | - | +| onClick | Radio 的点击事件 | `(event: React.MouseEvent) => void` | - | | value | 携带的标识值,用于 `Group` 模式 | `RadioValue` | - | ### Radio.Group diff --git a/src/components/radio/radio.tsx b/src/components/radio/radio.tsx index c5457d199b..b50623f156 100644 --- a/src/components/radio/radio.tsx +++ b/src/components/radio/radio.tsx @@ -23,6 +23,7 @@ export type RadioProps = { id?: string icon?: (checked: boolean) => React.ReactNode children?: React.ReactNode + onClick?: (event: React.MouseEvent) => void } & NativeProps<'--icon-size' | '--font-size' | '--gap'> const defaultProps = { @@ -86,6 +87,7 @@ export const Radio: FC = p => { return withNativeProps( props,