13 lines
260 B
TypeScript
13 lines
260 B
TypeScript
import { InputNumber } from 'antd';
|
|
|
|
export function MyMoneyInput(props: any) {
|
|
return (
|
|
<InputNumber
|
|
addonBefore="¥"
|
|
precision={2}
|
|
formatter={(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|