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

feat: export DraggerProps #51546

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

DBvc
Copy link
Contributor

@DBvc DBvc commented Nov 8, 2024

这个类型现在要从'antd/es/upload'目录去引用,不是很方便
这个类型还算比较常用的,能不能直接从入口就导出这个类型

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English export DraggerProps
🇨🇳 Chinese 导出类型DraggerProps

Copy link

stackblitz bot commented Nov 8, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented Nov 8, 2024

👁 Visual Regression Report for PR #51546 Passed ✅

🎯 Target branch: master (fad7df0)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

Copy link

概述

此PR改进了TypeScript定义,通过直接从入口导出DraggerProps类型,简化了引用方式。之前需要从antd/es/upload目录引用,现在可以直接从入口引用,提升了使用的便利性。

变更

文件 概要
components/index.ts DraggerProps类型从upload模块中导出,便于直接引用。

Copy link

pkg-pr-new bot commented Nov 8, 2024

@li-jia-nan
Copy link
Member

import { Upload } from 'antd';
import type { GetProps } from 'antd';

type DraggerPropsType = GetProps<typeof Upload.Dragger>;

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fad7df0) to head (bb0489e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #51546   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          761       761           
  Lines        13494     13494           
  Branches      3510      3510           
=========================================
  Hits         13494     13494           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@afc163 afc163 merged commit ead0c8e into ant-design:master Nov 8, 2024
42 checks passed
Copy link
Contributor

github-actions bot commented Nov 8, 2024

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

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