From 5455dd4cd7c27d14bc7f98f110ae14163dbaacc1 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期三, 16 二月 2022 15:30:10 +0800
Subject: [PATCH] 对比库新增跳到最末

---
 src/pages/library/components/baseList.vue |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue
index 4c8d585..3062d4d 100644
--- a/src/pages/library/components/baseList.vue
+++ b/src/pages/library/components/baseList.vue
@@ -193,25 +193,34 @@
         this.isAdmin || this.buttonAuthority.indexOf("," + authority + ",") > -1
       );
     },
-    async init() {
+    async init(typ) {
       await this.BaseManageData.querySyncTables();
       this.syncTableList = this.BaseManageData.syncTables;
-      this.defaultShow();
+      if (typ) {
+        this.clickLast(typ);
+      } else {
+        this.defaultShow();
+      }
       await this.BaseManageData.queryLocalTables();
       this.localTableList = this.BaseManageData.localTables;
-      this.defaultShow();
+      if (typ) {
+        this.clickLast(typ);
+      } else {
+        this.defaultShow();
+      }
     },
     add(type) {
       this.$emit("changeShow", null, type);
     },
     clickLast(type) {
-      this.$nextTick(() => {
-        this.clickCategory(
-          this.syncTableList.length - 1,
-          type,
-          this.syncTableList[this.syncTableList.length - 1]
-        );
-      });
+      // this.$nextTick(() => {
+
+      // });
+      this.clickCategory(
+        this.syncTableList.length - 1,
+        type,
+        this.syncTableList[this.syncTableList.length - 1]
+      );
     },
     clickCategory(index, type, item) {
       this.categoryIndex = type + index;

--
Gitblit v1.8.0