From 9843fb1d696b65811097b57a1c2e9123c9714924 Mon Sep 17 00:00:00 2001 From: Zhongxiang Wang Date: Wed, 16 Mar 2022 10:47:30 +0800 Subject: [PATCH] fix(components): [table] not scroll empty block when scrolling table (#6615) * fix(components): [table] not scroll empty block when scrolling table * fix(components): [table] fix unexpected gap * fix(components): [table] fix unexpected gap --- packages/components/table/src/table/style-helper.ts | 6 +++--- packages/theme-chalk/src/table.scss | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/components/table/src/table/style-helper.ts b/packages/components/table/src/table/style-helper.ts index d60b8b6ac8..a810c71896 100644 --- a/packages/components/table/src/table/style-helper.ts +++ b/packages/components/table/src/table/style-helper.ts @@ -43,8 +43,8 @@ function useStyle( }) const isGroup = ref(false) const scrollbarViewStyle = { - display: 'inline-flex', - flexDirection: 'column', + display: 'inline-block', + verticalAlign: 'middle', } watchEffect(() => { @@ -298,7 +298,7 @@ function useStyle( height = `calc(100% - ${layout.appendHeight.value}px)` } return { - width: bodyWidth.value, + width: `${resizeState.value.width}px`, height, } }) diff --git a/packages/theme-chalk/src/table.scss b/packages/theme-chalk/src/table.scss index 5f4dcc0c6d..d607f9a529 100644 --- a/packages/theme-chalk/src/table.scss +++ b/packages/theme-chalk/src/table.scss @@ -42,6 +42,8 @@ // when data is empty @include e(empty-block) { + position: sticky; + left: 0; min-height: 60px; text-align: center; width: 100%;