Skip to content

Commit

Permalink
fix(avatar): default slot
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed May 22, 2023
1 parent 744f813 commit 4b0eea3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/components/avatar/src/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ const Avatar = defineComponent({
...avatarProps,
ref: innerRef,
},
slots.default && slots.default(),
{
default: () => slots.default?.(),
},
)
return originalReturn as unknown as {
innerRef: AvatarElement
Expand Down Expand Up @@ -157,7 +159,9 @@ const AvatarImage = defineComponent({
src,
ref: innerRef,
},
slots.default && slots.default(),
{
default: () => slots.default?.(),
},
)
: null

Expand Down Expand Up @@ -227,7 +231,9 @@ const AvatarFallback = defineComponent({
...fallbackProps,
ref: innerRef,
},
slots.default && slots.default(),
{
default: () => slots.default?.(),
},
)
: canRender.value
}
Expand Down

0 comments on commit 4b0eea3

Please sign in to comment.