From 186e10078cccc9e8f33708d226ec484ca24900e5 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 28 Dec 2021 13:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/Framework.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/views/data/Framework.vue b/src/views/data/Framework.vue index f8585a0..be92f71 100644 --- a/src/views/data/Framework.vue +++ b/src/views/data/Framework.vue @@ -394,7 +394,7 @@ export default { }, // 编辑产品表名 editName(row){ - this.curRow = JSON.parse(JSON.stringify(row)) + this.curRow = JSON.parse(JSON.stringify(row)) // 深拷贝当前行数据 this.nameVisible = true }, // 保存产品表名 @@ -410,7 +410,7 @@ export default { }, // 编辑产品表头 editHead(row){ - this.curRow = JSON.parse(JSON.stringify(row)) + this.curRow = JSON.parse(JSON.stringify(row)) // 深拷贝当前行数据 this.preview(row, 1) this.editIndex++ // 强刷新表 this.headVisible = true @@ -477,16 +477,15 @@ export default { loadType(e){ clearTimeout(this.typeTimer) let typeTree = this.$refs.typeTreeWrap + // 防抖 this.typeTimer = setTimeout(() => { this.typeTreeScrollTop = typeTree.scrollTop - this.typeTreeScrollTop // 如果已经滚动到底部,则加载下面的数据 - if(this.typeTreeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){ + if(this.typeTreeScrollTop > 0 && typeTree.scrollHeight - (typeTree.clientHeight + parseInt(typeTree.scrollTop)) < 10){ this.getMoreTable(this.importTypeList,this.curExpand) - setTimeout(() => { - this.$nextTick(() => { - this.renderChecked() - }) - },300) + Promise.all(this.tablePromises).then(_ => { + this.renderChecked() + }) } },50) }, @@ -569,8 +568,6 @@ export default { this.importTypeList = res this.importLoading.close() this.importVisible = true - console.log('全部分类:', res) - console.log('该分类下已选的表id:', this.defaultTypeChecked) }) }).catch(res => { this.importLoading.close()