diff --git a/src/runtime/components/elements/AvatarGroup.ts b/src/runtime/components/elements/AvatarGroup.ts index bc0826f0..06fed0d6 100644 --- a/src/runtime/components/elements/AvatarGroup.ts +++ b/src/runtime/components/elements/AvatarGroup.ts @@ -36,10 +36,15 @@ export default defineComponent({ const children = computed(() => { let children = slots.default?.() - // @ts-ignore-next - if (children.length && children[0].type.name === 'ContentSlot') { + if (children.length) { + if (typeof children[0].type === 'symbol') { + // @ts-ignore-next + children = children[0].children // @ts-ignore-next - children = children[0].ctx.slots.default?.() + } else if (children[0].type.name === 'ContentSlot') { + // @ts-ignore-next + children = children[0].ctx.slots.default?.() + } } return children }) diff --git a/src/runtime/components/elements/ButtonGroup.ts b/src/runtime/components/elements/ButtonGroup.ts index 5bb5b4b7..d822eaee 100644 --- a/src/runtime/components/elements/ButtonGroup.ts +++ b/src/runtime/components/elements/ButtonGroup.ts @@ -30,10 +30,15 @@ export default defineComponent({ const children = computed(() => { let children = slots.default?.() - // @ts-ignore-next - if (children.length && children[0].type.name === 'ContentSlot') { + if (children.length) { + if (typeof children[0].type === 'symbol') { + // @ts-ignore-next + children = children[0].children // @ts-ignore-next - children = children[0].ctx.slots.default?.() + } else if (children[0].type.name === 'ContentSlot') { + // @ts-ignore-next + children = children[0].ctx.slots.default?.() + } } return children })