-
-
Notifications
You must be signed in to change notification settings - Fork 49.8k
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: Descriptions items.span
support responsive config
#44534
Conversation
Run & review this pull request in StackBlitz Codeflow. |
size-limit report 📦
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #44534 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 673 677 +4
Lines 11386 11503 +117
Branches 3071 3130 +59
==========================================
+ Hits 11386 11503 +117
☔ View full report in Codecov by Sentry. |
@zombieJ 这算是破坏性更新吗?antd v5.9 版本前后对 Descriptions 响应式处理不一样。 如下代码: <Descriptions column={{ sm: 2, xs: 1 }}>
<Descriptions.Item label="name">foo</Descriptions.Item>
<Descriptions.Item label="age">18</Descriptions.Item>
<Descriptions.Item label="address" span={2}>
xx路
</Descriptions.Item>
</Descriptions>
|
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
resolve #44442
💡 Background and solution
📝 Changelog
items.span
support responsive config.items.span
支持响应式设置。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at aae85dc
This pull request adds a new feature to
DescriptionsItem
that allows specifying responsivespan
values based on breakpoints. It also refactors and improves the code and documentation of theDescriptions
component and its related files.🔍 Walkthrough
🤖 Generated by Copilot at aae85dc
span
feature forDescriptionsItem
component (link, link, link, link, link, link, link, link, link)DEFAULT_COLUMN_MAP
object to./constant.ts
file (link, link, link)matchScreen
function from./_util/responsiveObserver.ts
file to get the value that matches the current screen size (link, link, link, link)useBreakpoint
hook fromantd
to get the current responsive breakpoints (link, link)useItems
hook to./hooks/useItems.ts
file to get the array of items with responsivespan
value (link, link, link, link, link)useRow
hook in./hooks/useRow.ts
file to expect items with responsivespan
value (link, link, link)Descriptions
component in./index.tsx
file to use the new hooks and functions and simplify the logic (link, link, link)span
property (link, link, link, link)