mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +08:00
ff31a5b555
This reverts commit 7a07b128d1
.
19 lines
328 B
Markdown
19 lines
328 B
Markdown
---
|
||
order: 3
|
||
title: 小数
|
||
---
|
||
|
||
和原生的数字输入框一样,value 的精度由 step 的小数位数决定。
|
||
|
||
````jsx
|
||
import { InputNumber } from 'antd';
|
||
|
||
function onChange(value) {
|
||
console.log('changed', value);
|
||
}
|
||
|
||
ReactDOM.render(
|
||
<InputNumber min={1} max={10} step={0.1} onChange={onChange} />
|
||
, mountNode);
|
||
````
|