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) }) },