From 94add13fd78bc84376b2f96a76717e46a1ac50b4 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Mon, 25 Nov 2024 15:20:36 +0800 Subject: [PATCH] releases 4.9.7 --- package.json | 2 +- packages/table/src/table.ts | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index dd240fe161..2122ab83ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.9.6", + "version": "4.9.7", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index 526f0524c8..e7a4cb4746 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -3970,16 +3970,21 @@ export default defineComponent({ * 支持 width=? width=?px width=?% min-width=? min-width=?px min-width=?% */ recalculate (reFull?: boolean) { - const { rceTimeout } = internalData - if (rceTimeout) { - clearTimeout(rceTimeout) - } else { - handleRecalculateLayout(!!reFull) - } - return new Promise(resolve => { + return new Promise(resolve => { + const { rceTimeout } = internalData + if (rceTimeout) { + clearTimeout(rceTimeout) + nextTick(() => { + resolve() + }) + } else { + resolve( + handleRecalculateLayout(!!reFull) + ) + } internalData.rceTimeout = setTimeout(() => { internalData.rceTimeout = undefined - resolve(handleRecalculateLayout(!!reFull)) + handleRecalculateLayout(!!reFull) }, 20) }) },