mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
722 B
722 B
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
通过 stringMode
开启高精度小数支持,onChange
事件将返回 string 类型。对于旧版浏览器,你需要 BigInt polyfill。
en-US
Use stringMode
to support high precision decimals support. onChange
will return string value instead. You need polyfill of BigInt if browser not support.
import { InputNumber } from 'antd';
function onChange(value: string) {
console.log('changed', value);
}
export default () => (
<InputNumber<string>
style={{ width: 200 }}
defaultValue="1"
min="0"
max="10"
step="0.00000000000001"
onChange={onChange}
stringMode
/>
);