remove CardTitle

This commit is contained in:
Timi
2026-08-13 15:10:00 +08:00
parent 931d87f370
commit 2d5ca121a5
5 changed files with 39 additions and 66 deletions
+25 -9
View File
@@ -1,13 +1,17 @@
<template>
<div class="card-container">
<card-title :title="title" :description="description">
<template v-if="$slots.title" #title>
<slot name="title" />
</template>
<template v-if="$slots.description" #description>
<slot name="description" />
</template>
</card-title>
<div class="card-title">
<h3 v-if="title || $slots.title" class="title">
<slot name="title">
<span v-text="title" />
</slot>
</h3>
<p v-if="description || $slots.description" class="description gray">
<slot name="description">
<span v-text="description" />
</slot>
</p>
</div>
<div v-if="$slots.default" class="content bg-white">
<slot />
</div>
@@ -41,9 +45,21 @@ defineOptions({
</script>
<style scoped lang="less">
.card-container {
.card-container {
margin: 0 1rem;
.card-title {
.title {
margin: 0 .875rem;
}
.description {
margin: .5rem .875rem;
font-size: .875rem;
}
}
.content {
overflow: hidden;
box-shadow: var(--td-shadow-1);