-
-
Notifications
You must be signed in to change notification settings - Fork 50.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: Avatar.Group #25192
feat: Avatar.Group #25192
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e5d3fc6:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hover 上去给 Popover 吧。 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
852c3be
to
8b91c47
Compare
感觉不需要 hovered。hover 到 Avatar 上显示的 tooltip 展示用户名。最后 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d5d4522
to
fce8456
Compare
components/avatar/avatar.tsx
Outdated
onError?: () => boolean; | ||
} | ||
|
||
const InternalAvatar: React.ForwardRefRenderFunction<unknown, AvatarProps> = props => { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
/* return false to prevent Avatar show default fallback behavior, then you can do fallback by your self */ | ||
onError?: () => boolean; | ||
interface CompoundedComponent | ||
extends React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>> { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
4b180c5
to
48f6a17
Compare
168aab3
to
4008c6a
Compare
Fixed. PTAL |
components/avatar/index.zh-CN.md
Outdated
| ------------------------- | -------------------- | ----------------- | ------ | ---- | | ||
| maxAvatarCount | 显示的最大头像个数 | number | - | | | ||
| maxAvatarStyle | 多余头像样式 | CSSProperties | - | | | ||
| maxAvatarPopoverPlacement | 多余头像气泡弹出位置 | `top` \| `bottom` | `top` | | |
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.
maxCount
应该就行了,Avatar 有点多余。
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.
ok
components/avatar/group.tsx
Outdated
className, | ||
); | ||
|
||
const renderChildren = () => { |
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.
看起来这个 renderChildren
没啥意义,直接打平就行了。
| 参数 | 说明 | 类型 | 默认值 | 版本 | | ||
| ------------------- | -------------------- | ----------------- | ------ | ---- | | ||
| maxCount | 显示的最大头像个数 | number | - | | | ||
| maxStyle | 多余头像样式 | CSSProperties | - | | |
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.
怎么 感觉 不太对,我的理解是 最大样式
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.
😂😂 我太难了,一人一个说法
| 参数 | 说明 | 类型 | 默认值 | 版本 | | ||
| ------------------- | -------------------------------------- | ----------------- | ------ | ---- | | ||
| maxCount | Max avatars to show | number | - | | | ||
| maxStyle | The style of excess avatar style | CSSProperties | - | | |
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.
maxStyle 看上去没啥用,可以先删掉。
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.
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.
明白了,那留着吧。
/rebase |
这个 CI 好像没关系 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge
View rendered components/avatar/demo/group.md