diff --git a/packages/vue/src/grid/src/table/src/utils/updateStyle.ts b/packages/vue/src/grid/src/table/src/utils/updateStyle.ts index 8e8d87bcde..258253fbed 100644 --- a/packages/vue/src/grid/src/table/src/utils/updateStyle.ts +++ b/packages/vue/src/grid/src/table/src/utils/updateStyle.ts @@ -28,7 +28,7 @@ import GlobalConfig from '../../../config' // 计算表格整体宽高 export function handleLayout(_vm) { - const { tableFullData, height, parentHeight, scrollXLoad, tableColumn } = _vm + const { tableFullData, height, parentHeight, scrollXLoad, scrollYLoad, tableColumn } = _vm let { maxHeight, minHeight, totalWidth } = _vm let customHeight, scaleToPx @@ -67,6 +67,10 @@ export function handleLayout(_vm) { _vm.bodyWrapperMinHeight = minHeight } + if (scrollYLoad && !_vm.bodyWrapperHeight) { + _vm.bodyWrapperHeight = maxHeight + } + _vm.bodyTableWidth = scrollXLoad ? tableColumn.reduce((previous, column) => previous + column.renderWidth, 0) : totalWidth