diff --git a/packages/components/table/src/table.vue b/packages/components/table/src/table.vue index 04820046fa..3de765f27c 100644 --- a/packages/components/table/src/table.vue +++ b/packages/components/table/src/table.vue @@ -100,6 +100,7 @@ /> .cell { @@ -558,10 +563,18 @@ } } - @include e(body-header) { - position: sticky; - top: 0; - z-index: calc(getCssVar('table-index') + 2); + &.#{$namespace}-table--scrollable-y { + @include e(body-header) { + position: sticky; + top: 0; + z-index: calc(getCssVar('table-index') + 2); + } + + @include e(body-footer) { + position: sticky; + bottom: 0; + z-index: calc(getCssVar('table-index') + 2); + } } @include e(column-resize-proxy) {