|
|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<div class="description">
|
|
|
<div class="d-title">{{ title }}</div>
|
|
|
- <a-descriptions :bordered="false">
|
|
|
+ <slot></slot>
|
|
|
+ <a-descriptions v-if="!isEmpty(items)" :bordered="false">
|
|
|
<a-descriptions-item v-for="(item, index) in items" :key="index" v-bind="item.extraProps">
|
|
|
<template #label>
|
|
|
<slot v-if="item.labelSlot" :name="item.labelSlot"></slot>
|
|
|
@@ -19,13 +20,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
+ import { isEmpty } from 'lodash';
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
title: {
|
|
|
required: true,
|
|
|
default: '',
|
|
|
},
|
|
|
items: {
|
|
|
- required: true,
|
|
|
+ required: false,
|
|
|
default: [],
|
|
|
},
|
|
|
});
|