ant-design / ant-design/pro-components

🐛[BUG]ProFormMoney组件如果设置了customSymbol为A$或者AU$,输入框输入金额会被裁切

Open
#8,402 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述
ProFormMoney组件中如果设置了customSymbol, 如果是单个$则正常,如果$前面有字符则会出现bug, 输入的金额会被裁切,只能输入一个字符

### 📷 复现步骤
![20240510155247_rec_](https://github.com/ant-design/pro-components/assets/42329829/38ea440f-4511-4fbb-85fe-550ade6bc090)

### 💻 复现代码

### © 版本信息

- ProComponents 版本: [2.6.50]
- umi 版本 4.0.1
- 浏览器环境 Chrome 122.0.6261.129
- 开发环境 [Windows 10]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided ProFormMoney example using customSymbol="AU$" in Chrome, then inspect the ProFormMoney handling of customSymbol and input values. Done means amounts are no longer clipped when the symbol contains characters before $, while the existing single-$ behavior remains working.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.