소스 검색

fix: fix if getDropdownList.length==0 show Dropdown component

JinMao 3 년 전
부모
커밋
21c771b59c
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      src/components/Table/src/components/TableAction.vue

+ 6 - 2
src/components/Table/src/components/TableAction.vue

@@ -8,14 +8,18 @@
       <Divider
         type="vertical"
         class="action-divider"
-        v-if="divider && index < getActions.length - (dropDownActions ? 0 : 1)"
+        v-if="
+          divider &&
+          index < getActions.length - (dropDownActions ? 0 : 1) &&
+          getDropdownList.length > 0
+        "
       />
     </template>
     <Dropdown
       :trigger="['hover']"
       :dropMenuList="getDropdownList"
       popconfirm
-      v-if="dropDownActions"
+      v-if="dropDownActions && getDropdownList.length > 0"
     >
       <slot name="more"></slot>
       <a-button type="link" size="small" v-if="!$slots.more">