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