签到完成
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="ai-card">
|
||||
<ai-bar v-if="!hideTitle" :title="title" v-bind="$attrs">
|
||||
<section class="ai-card" :class="{panel}">
|
||||
<ai-bar v-if="!hideHeader" :title="title" v-bind="$attrs">
|
||||
<template #title>
|
||||
<slot name="title"></slot>
|
||||
</template>
|
||||
@@ -9,7 +9,8 @@
|
||||
</template>
|
||||
</ai-bar>
|
||||
<div class="ai-card__body">
|
||||
<slot name="content"></slot>
|
||||
<slot v-if="$scopedSlots.content" name="content"/>
|
||||
<slot v-else/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -21,7 +22,11 @@ export default {
|
||||
title: {
|
||||
type: String
|
||||
},
|
||||
hideTitle: Boolean
|
||||
hideTitle: Boolean,
|
||||
panel: Boolean
|
||||
},
|
||||
computed: {
|
||||
hideHeader: v => v.hideTitle || v.panel
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -37,5 +42,15 @@ export default {
|
||||
.ai-card__body {
|
||||
padding: 12px 40px 22px;
|
||||
}
|
||||
|
||||
&.panel {
|
||||
margin-bottom: 0;
|
||||
|
||||
.ai-card__body {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user