ant-design/components/input-number/demo/digit.md
2016-05-27 11:48:08 +08:00

19 lines
328 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);
````