Skip to content

Commit

Permalink
fix(components): [table] not scroll empty block when scrolling table (e…
Browse files Browse the repository at this point in the history
…lement-plus#6615)

* fix(components): [table] not scroll empty block when scrolling table

* fix(components): [table] fix unexpected gap

* fix(components): [table] fix unexpected gap
  • Loading branch information
plainheart authored Mar 16, 2022
1 parent 4c7638d commit 9843fb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/components/table/src/table/style-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ function useStyle<T>(
})
const isGroup = ref(false)
const scrollbarViewStyle = {
display: 'inline-flex',
flexDirection: 'column',
display: 'inline-block',
verticalAlign: 'middle',
}

watchEffect(() => {
Expand Down Expand Up @@ -298,7 +298,7 @@ function useStyle<T>(
height = `calc(100% - ${layout.appendHeight.value}px)`
}
return {
width: bodyWidth.value,
width: `${resizeState.value.width}px`,
height,
}
})
Expand Down
2 changes: 2 additions & 0 deletions packages/theme-chalk/src/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@

// when data is empty
@include e(empty-block) {
position: sticky;
left: 0;
min-height: 60px;
text-align: center;
width: 100%;
Expand Down

0 comments on commit 9843fb1

Please sign in to comment.