Skip to content
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

Merged
merged 1 commit into from
May 9, 2023

Conversation

ldwonday
Copy link
Contributor

@ldwonday ldwonday commented May 8, 2023

No description provided.

@github-actions
Copy link

github-actions bot commented May 8, 2023

🎊 PR Preview has been successfully built and deployed to https://pro-components-preview-pr-7031.surge.sh

@chenshuai2144 chenshuai2144 changed the title fix: 当设置了digit的stringMode为true,但是组件没有返回string fix(form): 当设置了digit的stringMode为true,但是组件没有返回string May 8, 2023
@chenshuai2144
Copy link
Contributor

stringMode 是谁提供的功能? antd?

@ldwonday
Copy link
Contributor Author

ldwonday commented May 8, 2023

stringMode 是谁提供的功能? antd?

image
恩恩,是的

@chenshuai2144
Copy link
Contributor

修复下测试用例?

@ldwonday ldwonday force-pushed the fix/digit_stringmode branch 3 times, most recently from b20ccec to 2c06716 Compare May 8, 2023 08:18
@ldwonday
Copy link
Contributor Author

ldwonday commented May 8, 2023

用例已修复,但是这个流水线一直报错不知道啥问题

@chenshuai2144
Copy link
Contributor

再 merge 一下 master

@ldwonday
Copy link
Contributor Author

ldwonday commented May 9, 2023

done

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (31b809e) 97.73% compared to head (53149fb) 97.72%.

❗ Current head 53149fb differs from pull request most recent head 36010b0. Consider uploading reports for the commit 36010b0 to get more accurate results

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              
Impacted Files Coverage Δ
packages/field/src/components/Digit/index.tsx 97.36% <100.00%> (-2.64%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chenshuai2144 chenshuai2144 merged commit 5dddc32 into ant-design:master May 9, 2023
7 checks passed
@@ -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') {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这么改 stringMode 时就不会处理 precision 了吧,是不是应该把类型处理放在最后?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants