|
@@ -12,7 +12,7 @@ defineOptions({
|
|
|
name: 'Page',
|
|
name: 'Page',
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-const { autoContentHeight = false, heightOffset = 0 } =
|
|
|
|
|
|
|
+const { autoContentHeight = false, heightOffset = 0, footerFixed = false } =
|
|
|
defineProps<PageProps>();
|
|
defineProps<PageProps>();
|
|
|
|
|
|
|
|
const headerHeight = ref(0);
|
|
const headerHeight = ref(0);
|
|
@@ -36,9 +36,12 @@ async function calcContentHeight() {
|
|
|
if (!autoContentHeight) {
|
|
if (!autoContentHeight) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ shouldAutoHeight.value = false;
|
|
|
await nextTick();
|
|
await nextTick();
|
|
|
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
|
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
|
|
- footerHeight.value = footerRef.value?.offsetHeight || 0;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ footerHeight.value = footerFixed ? 0 : (footerRef.value?.offsetHeight || 0);
|
|
|
|
|
+
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
shouldAutoHeight.value = true;
|
|
shouldAutoHeight.value = true;
|
|
|
}, 30);
|
|
}, 30);
|