From 7d665069ad850616b20570c0be52732a9409480e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E6=97=AD?= <zxd@qq.com>
Date: Tue, 9 Jan 2024 16:59:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E5=86=85=E5=AE=B9=E6=97=B6=E5=9F=BA?=
 =?UTF-8?q?=E7=A1=80=E8=AE=BE=E7=BD=AE=E4=B8=8D=E5=8F=AF=E5=86=8D=E6=B7=BB?=
 =?UTF-8?q?=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../admin/src/components/Table.vue                   |  2 ++
 .../admin/src/views/basic/set/list.vue               | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/smart-office-manager-ui/admin/src/components/Table.vue b/smart-office-manager-ui/admin/src/components/Table.vue
index 42682eb..5d0bdea 100644
--- a/smart-office-manager-ui/admin/src/components/Table.vue
+++ b/smart-office-manager-ui/admin/src/components/Table.vue
@@ -12,6 +12,7 @@
           <slot name="table-head-left"></slot>
           <slot name="table-head-center">
             <el-button
+              v-show="isshowadd"
               v-if="isShowButton('notAdd')"
               type="primary"
               icon="el-icon-plus"
@@ -284,6 +285,7 @@ export default {
       loading: this.config.loading,
       showSearch: this.isShowSearch(this.$route.query),
       showType: "table",
+      isshowadd:true
     };
   },
 };
diff --git a/smart-office-manager-ui/admin/src/views/basic/set/list.vue b/smart-office-manager-ui/admin/src/views/basic/set/list.vue
index ff8c61a..f85b374 100644
--- a/smart-office-manager-ui/admin/src/views/basic/set/list.vue
+++ b/smart-office-manager-ui/admin/src/views/basic/set/list.vue
@@ -52,6 +52,18 @@
                 this.$refs.drawerform.view(row);
             },
 
+        },
+        watch:{
+          'tableData'(newval){
+            if (newval.data && newval.data.length>0) {
+              this.$refs.layoutTable.isshowadd=false
+              this.$forceUpdate()
+            }else{
+              this.$refs.layoutTable.isshowadd=true
+            }
+          },
+          deep:true,
+          
         },
         data() {
             return {
-- 
2.24.3