diff --git a/components/input-number/demo/basic.md b/components/input-number/demo/basic.md index e71dcc1750..c5c21f50ea 100644 --- a/components/input-number/demo/basic.md +++ b/components/input-number/demo/basic.md @@ -9,30 +9,12 @@ ````jsx var InputNumber = antd.InputNumber; -function onChange(v){ - console.log('changed',v); +function onChange(value) { + console.log('changed', value); } -var Test = React.createClass({ - getInitialState(){ - return { - disabled:false - }; - }, - toggle(){ - this.setState({ - disabled:!this.state.disabled - }); - }, - render(){ - return
- -     - -
; - } -}); - -React.render(, document.getElementById('components-input-number-demo-basic')); +React.render( + +, document.getElementById('components-input-number-demo-basic')); ```` diff --git a/components/input-number/demo/disabled.md b/components/input-number/demo/disabled.md new file mode 100644 index 0000000000..dac631284d --- /dev/null +++ b/components/input-number/demo/disabled.md @@ -0,0 +1,34 @@ +# 不可用 + +- order: 0 + +点击按钮切换可用状态。 + +--- + +````jsx +var InputNumber = antd.InputNumber; + +var Test = React.createClass({ + getInitialState() { + return { + disabled:false + }; + }, + toggle() { + this.setState({ + disabled: !this.state.disabled + }); + }, + render() { + return
+ +
+
+ +
; + } +}); + +React.render(, document.getElementById('components-input-number-demo-disabled')); +```` diff --git a/components/input-number/index.jsx b/components/input-number/index.jsx index de1f043bf6..2c7579c0ad 100644 --- a/components/input-number/index.jsx +++ b/components/input-number/index.jsx @@ -8,7 +8,7 @@ var AntInputNumber = React.createClass({ }; }, render() { - return ; + return ; } });