ant-design / ant-design/pro-components
👑 [需求] ProFormMoney 支持按分提交、按元展示吗?
Open
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🔩 所属模块或组件
ProFormMoney
### 🥰 需求描述
字段服务端是按分存储,但是实际填写的时候应该按元填写。需要在获取数据和提交数据的时候对数据进行转换。
ProFormMoney 能不能直接支持这类需求
### ⛰ 功能需求适用场景
### 🧐 解决方案
ProFormMoney 增加 unit: cent 参数
### 🚑 其他信息
Contributor guide
Research direction
Start with the ProFormMoney implementation and inspect how it retrieves field values and submits data. Add support for the proposed unit: cent option so server-side cents are displayed as yuan and converted back to cents on submission; done means both data directions handle the unit consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100