2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 0
|
2016-08-18 15:59:07 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 基本
|
|
|
|
en-US: Basic
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-07-01 14:48:47 +08:00
|
|
|
|
2016-08-18 15:59:07 +08:00
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
数字输入框。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2016-08-18 15:46:11 +08:00
|
|
|
Numeric-only input box.
|
2015-07-01 14:48:47 +08:00
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { InputNumber } from 'antd';
|
2015-07-01 14:48:47 +08:00
|
|
|
|
2015-07-15 16:13:00 +08:00
|
|
|
function onChange(value) {
|
|
|
|
console.log('changed', value);
|
2015-07-01 14:48:47 +08:00
|
|
|
}
|
|
|
|
|
2015-10-20 16:47:55 +08:00
|
|
|
ReactDOM.render(
|
2018-06-27 15:55:04 +08:00
|
|
|
<InputNumber min={1} max={10} defaultValue={3} onChange={onChange} />,
|
|
|
|
mountNode);
|
2015-07-01 14:48:47 +08:00
|
|
|
````
|