fix: update content height calculation and improve rendering logic in page component
parent
662c8f7a47
commit
f85f1136c5
|
|
@ -48,7 +48,7 @@ async function calcContentHeight() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await nextTick();
|
await nextTick();
|
||||||
const { getLayoutFooterHeight } = useLayoutFooterStyle();
|
const { getLayoutFooterHeight } = await useLayoutFooterStyle();
|
||||||
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
headerHeight.value = headerRef.value?.offsetHeight || 0;
|
||||||
footerHeight.value = getLayoutFooterHeight() || 0;
|
footerHeight.value = getLayoutFooterHeight() || 0;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -91,7 +91,12 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="contentClass" :style="contentStyle" class="h-full p-4">
|
<div
|
||||||
|
v-if="shouldAutoHeight"
|
||||||
|
:class="contentClass"
|
||||||
|
:style="contentStyle"
|
||||||
|
class="h-full p-4"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue