-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(form): 当设置了digit的stringMode为true,但是组件没有返回string #7031
Conversation
🎊 PR Preview has been successfully built and deployed to https://pro-components-preview-pr-7031.surge.sh |
stringMode 是谁提供的功能? antd? |
修复下测试用例? |
b20ccec
to
2c06716
Compare
用例已修复,但是这个流水线一直报错不知道啥问题 |
再 merge 一下 master |
2c06716
to
36010b0
Compare
done |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #7031 +/- ##
==========================================
- Coverage 97.73% 97.72% -0.01%
==========================================
Files 338 338
Lines 10980 10980
Branches 3940 3940
==========================================
- Hits 10731 10730 -1
- Misses 206 207 +1
Partials 43 43
☔ View full report in Codecov by Sentry. |
@@ -32,7 +32,7 @@ const FieldDigit: ProFieldFC<FieldDigitProps> = ( | |||
(value: number | string | null) => { | |||
let val = value ?? undefined; | |||
|
|||
if (typeof val === 'string') { | |||
if (!fieldProps.stringMode && typeof val === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这么改 stringMode 时就不会处理 precision 了吧,是不是应该把类型处理放在最后?
No description provided.