Przeglądaj źródła

Merge branch 'dev' of http://59.110.6.97:3000/root/BoundLink-Plate-UI into dev

lirenjie 7 miesięcy temu
rodzic
commit
490aad341c
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      src/components/BsUi/Descriptions/index.vue

+ 5 - 2
src/components/BsUi/Descriptions/index.vue

@@ -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: [],
     },
   });