Selaa lähdekoodia

修改curd表头按钮样式bug

liuyanpeng 1 vuosi sitten
vanhempi
sitoutus
d77f8536c8
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      src/window1/tabGridView/NewTabButton.vue

+ 6 - 3
src/window1/tabGridView/NewTabButton.vue

@@ -64,7 +64,8 @@
         <a-button v-else :icon="h(LayoutTwoTone)">{{ item.name }}</a-button>
       </template>
     </a-space>
-    <a-space size="small">
+    <div v-else />
+    <a-space v-if="rightTabButton && rightTabButton.length" size="small">
       <template v-for="(item, index) in rightTabButton" :key="index">
         <a-button
           v-if="item.action === 'CREATE'"
@@ -128,6 +129,7 @@
         <a-button v-else :icon="h(LayoutTwoTone)">{{ item.name }}</a-button>
       </template>
     </a-space>
+    <div v-else />
   </div>
 
   <Modal
@@ -475,9 +477,10 @@ const tabButtonsHandler = nowTabButtons => {
       leftTabButton.value.push(item);
     }
   });
-  if (leftTabButton.value.length > 0 && rightTabButton.value.length > 0) {
+  if (leftTabButton.value.length > 0 || rightTabButton.value.length > 0) {
     emit('judgeIsHaveButtons', true);
-  } else {
+  }
+  if (leftTabButton.value.length === 0 && rightTabButton.value.length === 0) {
     emit('judgeIsHaveButtons', false);
   }
 };