diff --git a/packages/varlet-ui/src/space/Space.tsx b/packages/varlet-ui/src/space/Space.tsx index 8e469603d70..050ca8e4800 100644 --- a/packages/varlet-ui/src/space/Space.tsx +++ b/packages/varlet-ui/src/space/Space.tsx @@ -5,6 +5,9 @@ import { toPxNum } from '../utils/elements' import { isArray } from '../utils/shared' import '../styles/common.less' import './space.less' +import { call, createNamespace } from '../utils/components' + +const { n, classes } = createNamespace('space') const internalSizes: Record = { mini: [4, 4], @@ -27,7 +30,7 @@ export default defineComponent({ return () => { const { inline, justify, align, wrap, direction, size } = props - let children: VNodeChild[] = slots.default?.() ?? [] + let children: VNodeChild[] = call(slots.default) ?? [] const isInternalSize = internalSizeValidator(size) const [y, x] = getSize(size, isInternalSize) @@ -85,7 +88,7 @@ export default defineComponent({ return (