mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 08:43:57 +08:00
27 lines
404 B
Markdown
27 lines
404 B
Markdown
---
|
|
order: 4
|
|
title:
|
|
zh-CN: 格式化展示
|
|
en-US: Formatter
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
展示具有具体含义的数据。
|
|
|
|
## en-US
|
|
|
|
Display value within it's situation.
|
|
|
|
````jsx
|
|
import { InputNumber } from 'antd';
|
|
|
|
function onChange(value) {
|
|
console.log('changed', value);
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<InputNumber formatter={value => `$ ${value}`} defaultValue={100} onChange={onChange} />
|
|
, mountNode);
|
|
````
|