ant-design-vue
ant-design-vue copied to clipboard
The formatter parser attribute is added to the input number, and the precision retains the decimal place invalid problem
trafficstars
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.2.11
Environment
Vue:3.2.13
Reproduction link
Steps to reproduce
inputNumer 设置 formatter="value => $ ${value}.replace(/\B(?=(\d{3}) (?!\d))/g, ',')" parser="value => value.replace(/$\s?|(,*)/g, '')" precision="2" 输入值之后离开,如果为整数时不会保留对应设置小数位
What is expected?
输入 99999 能转成 999,99.00
What is actually happening?
输入 99999 输出了 999,99
@tangjinzhou 大佬 帮忙看看
正则有问题吧
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.