fix: fix content style error when footer is not fixed

This commit is contained in:
vben
2024-07-06 15:49:21 +08:00
parent 19b57fa4f7
commit 826907f6c3
8 changed files with 13 additions and 11 deletions

View File

@@ -307,6 +307,7 @@ const tabbarStyle = computed((): CSSProperties => {
const contentStyle = computed((): CSSProperties => {
const fixed = headerFixed.value;
const { footerEnable, footerFixed, footerHeight } = props;
return {
marginTop:
fixed &&
@@ -315,7 +316,7 @@ const contentStyle = computed((): CSSProperties => {
(!isHeaderAuto.value || scrollY.value < headerWrapperHeight.value)
? `${headerWrapperHeight.value}px`
: 0,
paddingBottom: `${props.footerEnable ? props.footerHeight : 0}px`,
paddingBottom: `${footerEnable && footerFixed ? footerHeight : 0}px`,
};
});