-
-
Notifications
You must be signed in to change notification settings - Fork 49.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
feat: add avatar gap api #24357
feat: add avatar gap api #24357
Conversation
哥,录gif软件是什么? |
Mac 我用 Gifox |
@@ -439,6 +439,7 @@ exports[`renders ./components/avatar/demo/dynamic.md correctly 1`] = ` | |||
<div> | |||
<span | |||
class="ant-avatar ant-avatar-lg ant-avatar-circle" | |||
gap="4" |
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.
不应该有这个。
components/avatar/index.tsx
Outdated
} | ||
|
||
if (this.lastGap !== gap) { | ||
this.lastGap = gap; |
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.
this.lastGap 没什么用。
components/avatar/index.zh-CN.md
Outdated
@@ -22,3 +22,4 @@ title: Avatar | |||
| srcSet | 设置图片类头像响应式资源地址 | string | - | | | |||
| alt | 图像无法显示时的替代文本 | string | - | | | |||
| onError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - | | | |||
| gap | 字符类型距离左右两侧边界间隙 | number | 4 | 4.3.0 | |
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.
单位像素
) { | ||
return; |
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.
当 childrenWidth 和 nodeWidth 都不变,只修改 gap 时候,不加这个 lastGap ,就直接 return 了
@afc163
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.
lastGap 没有用到吧,我就看到下面有个赋值。
e44ed98
to
ad1497f
Compare
2bd9712
to
568a6e2
Compare
Codecov Report
@@ Coverage Diff @@
## feature #24357 +/- ##
========================================
Coverage 98.75% 98.75%
========================================
Files 364 364
Lines 7409 7411 +2
Branches 2007 2010 +3
========================================
+ Hits 7317 7319 +2
Misses 92 92
Continue to review full report at Codecov.
|
/rebase |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
#24330 (comment)
Demo show
📝 Changelog
gap
to set the unit distance between left and right sides.gap
来设置字符类型距离左右两侧边界单位像素。☑️ Self Check before Merge
View rendered components/avatar/demo/dynamic.md
View rendered components/avatar/index.en-US.md
View rendered components/avatar/index.zh-CN.md