From 4fe1929eeba1314d04eff3a0071bd668b1d89141 Mon Sep 17 00:00:00 2001 From: jljsj Date: Fri, 17 Jul 2015 10:57:19 +0800 Subject: [PATCH] update radio index.md --- components/radio/index.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/components/radio/index.md b/components/radio/index.md index 539ea4f1d8..41f1c978a9 100644 --- a/components/radio/index.md +++ b/components/radio/index.md @@ -20,4 +20,22 @@ |-----------|------------------------------------------|------------|-------|--------| | checked | 指定当前是否选中 | boolean | | false | | defaultChecked | 初始是否选中 | boolean | | false | -| onChange | 组合时必须 | Function(e:Event) | | | | +| onChange | 变化时回调函数,组合时必须 | Function(e:Event) | | | +| value | value参数,组合时根据此项判定checked | -- | | | | + +####组合使用: +以value值来决定自身的checked, + +gruop里需一个做全局checked的参数 +`getInitialState() { + return { + r: 'a' + } +}` + +在自身checked上判断`this.state.r === 'a'`; + +回调接口里 +`this.setState({ + r: e.target.value + })`