diff --git a/components/radio/__tests__/__snapshots__/demo.test.js.snap b/components/radio/__tests__/__snapshots__/demo.test.js.snap index 903bf497e3..fb46ed1314 100644 --- a/components/radio/__tests__/__snapshots__/demo.test.js.snap +++ b/components/radio/__tests__/__snapshots__/demo.test.js.snap @@ -53,7 +53,7 @@ exports[`renders ./components/radio/demo/basic.tsx correctly 1`] = ` allowFontScaling={true} ellipsizeMode="tail" > - 支持 + Support - 表单单选项,普通列表中单选项 + Form radio, radio in general list. - 使用 Ant Desgin Component + Use Ant Desgin Component - 使用 Ant Desgin Component + Use Ant Desgin Component - 个性化调整disabled + Set disabled - 个性化调整disabled + Set disabled - RadioItem 演示 + RadioItem Demo
- 博士 + Doctor
- 本科 + Bachelor
- 篮球 + Basketball
- 辅助文字内容 + Details
- 足球 + Football
- 辅助文字内容 + Details
- 禁用状态 + Disabled
- 博士 + Doctor
- 本科 + Bachelor
- 篮球 + Basketball
- 辅助文字内容 + Details
- 足球 + Football
- 辅助文字内容 + Details
- Radio 演示 (自定义样式) + Radio Demo(Customized style)
- 同意协议 + Agree
diff --git a/components/radio/demo/basic.md b/components/radio/demo/basic.md index 4de2d6964c..2205fb567e 100644 --- a/components/radio/demo/basic.md +++ b/components/radio/demo/basic.md @@ -33,16 +33,16 @@ class Test extends React.Component { render() { const { value, value2, value3, value4 } = this.state; const data = [ - { value: 0, label: '博士' }, - { value: 1, label: '本科' }, + { value: 0, label: 'Doctor' }, + { value: 1, label: 'Bachelor' }, ]; const data2 = [ - { value: 0, label: '篮球', extra: '辅助文字内容' }, - { value: 1, label: '足球', extra: '辅助文字内容' }, + { value: 0, label: 'Basketball', extra: 'Details' }, + { value: 1, label: 'Football', extra: 'Details' }, ]; return (
- 'RadioItem 演示'}> + 'RadioItem Demo'}> {data.map(i => ( this.onChange(i.value)}> {i.label} @@ -58,7 +58,7 @@ class Test extends React.Component { ))} - '禁用状态'}> + 'Disabled'}> {data.map(i => ( this.onChange3(i.value)} disabled> {i.label} @@ -74,9 +74,9 @@ class Test extends React.Component { ))} - Radio 演示 (自定义样式) + Radio Demo(Customized style) - console.log('checkbox', e)}>同意协议 + console.log('checkbox', e)}>Agree
); diff --git a/components/radio/demo/basic.tsx b/components/radio/demo/basic.tsx index ea078fc55e..97dbcf3636 100644 --- a/components/radio/demo/basic.tsx +++ b/components/radio/demo/basic.tsx @@ -23,7 +23,7 @@ export default class BasicRadioExample extends React.Component { }} style={{ borderWidth: 1, borderColor: '#999', margin: 10 }} > - 支持 + Support {
- 表单单选项,普通列表中单选项 + Form radio, radio in general list. { @@ -48,7 +48,7 @@ export default class BasicRadioExample extends React.Component { } }} > - 使用 Ant Desgin Component + Use Ant Desgin Component { } }} > - 使用 Ant Desgin Component + Use Ant Desgin Component - 个性化调整disabled - 个性化调整disabled + Set disabled + Set disabled
); diff --git a/components/radio/index.en-US.md b/components/radio/index.en-US.md index 6b1f393b0c..b71592ec22 100644 --- a/components/radio/index.en-US.md +++ b/components/radio/index.en-US.md @@ -4,7 +4,7 @@ type: Data Entry title: Radio --- -单选框 +Radio. ## API @@ -14,13 +14,14 @@ Support WEB, React-Native. Properties | Descrition | Type | Default -----------|------------|------|-------- -| name | name | String | 无 | -| defaultChecked | 初始是否选中 | Boolean | 无 | -| checked | 指定当前是否选中 | Boolean | 无 | -| disabled | 禁用 | Boolean | false | -| onChange | change 事件触发的回调函数 | (e: Object): void | 无 | +| name | name | String | - | +| defaultChecked | the initial checked state | Boolean | - | +| checked | to set the current checked state | Boolean | - | +| disabled | whether disabled | Boolean | false | +| onChange | a callback function, can be executed when the checked state changes | (e: Object): void | - | ### Radio.RadioItem -基于`List.Item`对`Radio`进行封装,`List.Item`的`extra`属性固定传入`Radio`,其他属性和`List.Item`一致。 -其他 API 和 Radio 相同。 +The encapsulation about `Radio` based on `List.Item`, the property `extra` of `List.Item` will be passed to `Radio`, while other properties remain the same. + +Other APIs are identical with `Radio`.