Skip to content

Commit

Permalink
releases 4.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Nov 25, 2024
1 parent 6e6f589 commit 94add13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
21 changes: 13 additions & 8 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>(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)
})
},
Expand Down

0 comments on commit 94add13

Please sign in to comment.