diff --git a/components/input-number/__tests__/__snapshots__/demo.test.js.snap b/components/input-number/__tests__/__snapshots__/demo.test.js.snap index 988762c9d7..4ff453661b 100644 --- a/components/input-number/__tests__/__snapshots__/demo.test.js.snap +++ b/components/input-number/__tests__/__snapshots__/demo.test.js.snap @@ -107,6 +107,38 @@ exports[`test renders ./components/input-number/demo/disabled.md correctly 1`] = `; +exports[`test renders ./components/input-number/demo/formatter.md correctly 1`] = ` +
+
+ + + + + + +
+
+ +
+
+`; + exports[`test renders ./components/input-number/demo/size.md correctly 1`] = `
`$ ${value}`} defaultValue={100} onChange={onChange} /> +, mountNode); +```` diff --git a/components/input-number/index.en-US.md b/components/input-number/index.en-US.md index 0dcc55970b..1d1721e291 100644 --- a/components/input-number/index.en-US.md +++ b/components/input-number/index.en-US.md @@ -19,6 +19,7 @@ When a numeric value needs to be provided. | value | current value | number | | | step | The number to which the current value is increased or decreased. It can be an integer or decimal. | number\|string | 1 | | defaultValue | initial value | number | | -| onChange | The callback triggered when the value is changed. | Function(value: number | string) | | +| onChange | The callback triggered when the value is changed. | function(value: number | string) | | | disabled | disable the input | boolean | false | -| size | width of input box | string | none | +| size | width of input box | string | - | +| formatter | Specifies the format of the value presented | function(value: number | string): string | - | diff --git a/components/input-number/index.zh-CN.md b/components/input-number/index.zh-CN.md index 9d3a7c1666..cfc5061b67 100644 --- a/components/input-number/index.zh-CN.md +++ b/components/input-number/index.zh-CN.md @@ -25,3 +25,4 @@ title: InputNumber | onChange | 变化回调 | Function(value: number | string) | | | disabled | 禁用 | boolean | false | | size | 输入框大小 | string | 无 | +| formatter | 指定输入框展示值的格式 | function(value: number | string): string | - | diff --git a/package.json b/package.json index 91308d1296..7b9edab4e1 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "rc-dropdown": "~1.4.8", "rc-editor-mention": "~0.6.0", "rc-form": "~1.3.0", - "rc-input-number": "~3.2.1", + "rc-input-number": "~3.3.0", "rc-menu": "~5.0.9", "rc-notification": "~1.4.0", "rc-pagination": "~1.7.0",