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): 修复 getFieldsValue 类型定义 #1020

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

zousandian
Copy link
Contributor

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

#828

💡 需求背景和解决方案

📝 更新日志

fix(form): 修复 getFieldsValue 类型定义

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@zousandian
Copy link
Contributor Author

修复以下问题

const form = createRef<FormInstanceFunctions<{ name: string }>>()
const data = form.current?.getFieldsValue?.(true)

// 报错: Property 'name' does not exist on type 'getFieldsValue<{ name: string; }>'
console.log(data?.name) 

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #1020 (0eed5b2) into develop (7b04365) will decrease coverage by 0.04%.
The diff coverage is 58.77%.

@@             Coverage Diff             @@
##           develop    #1020      +/-   ##
===========================================
- Coverage    60.40%   60.36%   -0.05%     
===========================================
  Files          937      951      +14     
  Lines        16498    16626     +128     
  Branches      3743     3793      +50     
===========================================
+ Hits          9966    10036      +70     
- Misses        6532     6590      +58     
Impacted Files Coverage Δ
src/_util/dom.ts 42.59% <ø> (ø)
src/_util/helper.ts 41.07% <ø> (ø)
src/_util/insertCSS.ts 0.00% <ø> (ø)
src/_util/number.ts 33.33% <ø> (ø)
src/_util/setStyle.ts 0.00% <ø> (ø)
src/_util/useDialogEsc.ts 46.66% <ø> (ø)
src/_util/useDragSorter.tsx 25.45% <ø> (ø)
src/_util/useRipple.ts 26.76% <ø> (ø)
src/anchor/Anchor.tsx 81.33% <ø> (ø)
src/anchor/_util/dom.ts 66.66% <ø> (ø)
... and 103 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3e9e34...0eed5b2. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2022

完成

@honkinglin
Copy link
Collaborator

emm 邮箱要改一下不能用 tencent

@zousandian
Copy link
Contributor Author

@HQ-Lin 改了,帮忙看看

@honkinglin honkinglin merged commit 4014d8f into Tencent:develop Jul 6, 2022
@github-actions github-actions bot mentioned this pull request Jul 11, 2022
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants