heyujie
2022-02-16 5455dd4cd7c27d14bc7f98f110ae14163dbaacc1
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;
      if (typ) {
        this.clickLast(typ);
      } else {
      this.defaultShow();
      }
      await this.BaseManageData.queryLocalTables();
      this.localTableList = this.BaseManageData.localTables;
      if (typ) {
        this.clickLast(typ);
      } else {
      this.defaultShow();
      }
    },
    add(type) {
      this.$emit("changeShow", null, type);
    },
    clickLast(type) {
      this.$nextTick(() => {
      // this.$nextTick(() => {
      // });
        this.clickCategory(
          this.syncTableList.length - 1,
          type,
          this.syncTableList[this.syncTableList.length - 1]
        );
      });
    },
    clickCategory(index, type, item) {
      this.categoryIndex = type + index;