Skip to content

Commit

Permalink
fix(avatar): add borderedWithGroup attr
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmywang committed Apr 3, 2023
1 parent 821f924 commit afb2240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/avatar/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default class Avatar extends SuperComponent {
classPrefix: name,
isShow: true,
zIndex: 0,
borderedWithGroup: false,
};

relations: RelationsOptions = {
Expand All @@ -38,7 +39,7 @@ export default class Avatar extends SuperComponent {

this.setData({
size: this.data.size ?? parent.data.size,
bordered: true,
borderedWithGroup: true,
});
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/avatar.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
t-class-count="{{badgeProps.tClassCount}}"
>
<view
class="{{this.getClass(classPrefix, size, shape, bordered)}} {{prefix}}-class-image"
class="{{this.getClass(classPrefix, size, shape, bordered || borderedWithGroup)}} {{prefix}}-class-image"
style="{{this.getSize(size)}}"
aria-label="{{ ariaLabel || alt ||'头像'}}"
aria-role="{{ ariaRole || 'img'}}"
Expand Down

0 comments on commit afb2240

Please sign in to comment.