Skip to content

Commit

Permalink
fix: slot
Browse files Browse the repository at this point in the history
  • Loading branch information
ckvv committed Sep 25, 2023
1 parent eba0864 commit c5aa301
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/space/space.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { type StyleValue, computed, inject, useSlots } from 'vue';
import { type StyleValue, computed, inject } from 'vue';
import { isBoolean } from '@/utils';
import { spaceInjectionKey } from '@/themes';
import { useSize, useSizeValue } from '@/hooks';
Expand All @@ -22,8 +22,6 @@ const props = withDefaults(defineProps<{
fill: false,
});
const slots: any = useSlots();
const IV = inject(spaceInjectionKey)!;
const spaceClass = computed(() => {
Expand Down Expand Up @@ -52,6 +50,6 @@ const spaceStyle = computed(() => {

<template>
<div :class="spaceClass" :style="spaceStyle">
<component :is="() => slots.default()" />
<slot />
</div>
</template>

0 comments on commit c5aa301

Please sign in to comment.