feat: integrate layout footer height calculation in page component
parent
0d17a86c10
commit
662c8f7a47
|
@ -1,6 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, nextTick, onMounted, ref, useTemplateRef } from 'vue';
|
import { computed, nextTick, onMounted, ref, useTemplateRef } from 'vue';
|
||||||
|
|
||||||
|
import { useLayoutFooterStyle } from '@vben/hooks';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title?: string;
|
title?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
@ -46,8 +48,9 @@ async function calcContentHeight() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
const { getLayoutFooterHeight } = useLayoutFooterStyle();
|
||||||
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
||||||
footerHeight.value = footerRef.value?.offsetHeight || 0;
|
footerHeight.value = getLayoutFooterHeight() || 0;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
shouldAutoHeight.value = true;
|
shouldAutoHeight.value = true;
|
||||||
}, 30);
|
}, 30);
|
||||||
|
|
Loading…
Reference in New Issue