mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 07:20:07 +08:00
fix(design): card没有slots时隐藏对应slot
This commit is contained in:
parent
2a714ae9cc
commit
4ddc55aa6d
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<component class="tmagic-design-card" :is="uiComponent" v-bind="uiProps">
|
||||
<template #header>
|
||||
<template #header v-if="$slots.header">
|
||||
<slot name="header" class="header"></slot>
|
||||
</template>
|
||||
|
||||
<template #default>
|
||||
<template #default v-if="$slots.default">
|
||||
<slot name="default"></slot>
|
||||
</template>
|
||||
</component>
|
||||
|
@ -6,7 +6,7 @@
|
||||
@update:modelValue="updateModelValue"
|
||||
@change="changeHandler"
|
||||
>
|
||||
<template #default>
|
||||
<template #default v-if="$slots.default">
|
||||
<slot></slot>
|
||||
</template>
|
||||
</component>
|
||||
|
Loading…
x
Reference in New Issue
Block a user