ant-design / ant-design/pro-components
🐛[BUG]pro components 3.1.11 valueType为percent时,precision失效
Open
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
在pro components 3.1.11这个版本中。很可能之前的版本也是。
在protable中,如果columns是这样写的。
valueType: () => ({ type: 'percent', rate: 2, precision: 8 })
那么,小数被显示出来的时候,永远是2位,永远不会是8位。
如果你有一个值,是0.000001,那么显示出来的一直是0.00%
Contributor guide
Research direction
Start at the ProTable column configuration and the percent valueType renderer, focusing on how rate and precision are applied when displaying decimal values. Reproduce the reported configuration with a value such as 0.000001; done means precision: 8 controls the displayed percentage rather than always showing two decimal places.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100