From 6981b73ef6fcf9bfe2c3089a3e68edf17f806e62 Mon Sep 17 00:00:00 2001 From: Arvin <46149128+iconFehu@users.noreply.github.com> Date: Sun, 10 Jul 2022 18:28:52 +0800 Subject: [PATCH] fix: fix table header and table body cannot be aligned (#2058) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fix wrong naming * perf: 表单设置初始值defaultValue时候使用深度拷贝 * perf: 表单设置初始值defaultValue时候使用深度拷贝 * Revert "perf: 表单设置初始值defaultValue时候使用深度拷贝" This reverts commit a103cd11b4c8e4eeac3be114c103a5c30f562042. * perf: perf Tree Component * fix: 解决tree树形异步懒加载,点击两次才能关闭 * fix: fix table header and table body cannot be aligned Co-authored-by: yfh01 --- src/components/Table/src/hooks/useTableScroll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/src/hooks/useTableScroll.ts b/src/components/Table/src/hooks/useTableScroll.ts index 803350b2..839ae0f5 100644 --- a/src/components/Table/src/hooks/useTableScroll.ts +++ b/src/components/Table/src/hooks/useTableScroll.ts @@ -191,7 +191,7 @@ export function useTableScroll( const columns = unref(columnsRef).filter((item) => !item.defaultHidden); columns.forEach((item) => { - width += Number.parseInt(item.width as string) || 0; + width += Number.parseFloat(item.width as string) || 0; }); const unsetWidthColumns = columns.filter((item) => !Reflect.has(item, 'width'));