fix: table auto height (#5101)

This commit is contained in:
Netfan
2024-12-11 13:46:52 +08:00
committed by GitHub
parent eec6f41f6a
commit 4a20156f3d

View File

@@ -39,9 +39,7 @@ const footerRef = useTemplateRef<HTMLDivElement>('footerRef');
const contentStyle = computed<StyleValue>(() => { const contentStyle = computed<StyleValue>(() => {
if (autoContentHeight) { if (autoContentHeight) {
return { return {
height: shouldAutoHeight.value height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px)`,
? `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px)`
: '0',
overflowY: shouldAutoHeight.value ? 'auto' : 'unset', overflowY: shouldAutoHeight.value ? 'auto' : 'unset',
}; };
} }