ant-design/components/input-number/demo/digit.md
2016-04-15 23:56:44 +08:00

19 lines
330 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- 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);
````