ant-design/components/input-number/demo/basic.md

20 lines
261 B
Markdown
Raw Normal View History

2015-07-01 14:48:47 +08:00
# 基本
- order: 0
2016-04-15 23:39:39 +08:00
数字输入框。
2015-07-01 14:48:47 +08:00
---
````jsx
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(
2015-07-20 20:03:45 +08:00
<InputNumber min={1} max={10} defaultValue={3} onChange={onChange} />
, mountNode);
2015-07-01 14:48:47 +08:00
````