* fix(@vben/common-ui): resolve #6698 * fix(@vben/common-ui): resolve #6698 * fix(@vben/common-ui): resolve conversation * fix(@vben/common-ui): resolve #6698pull/209/head
parent
c57592f3a6
commit
6a85b3ab84
|
|
@ -25,7 +25,7 @@ const footerRef = useTemplateRef<HTMLDivElement>('footerRef');
|
||||||
const contentStyle = computed<StyleValue>(() => {
|
const contentStyle = computed<StyleValue>(() => {
|
||||||
if (autoContentHeight) {
|
if (autoContentHeight) {
|
||||||
return {
|
return {
|
||||||
height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${typeof heightOffset === 'number' ? `${heightOffset}px` : heightOffset})`,
|
height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${footerHeight.value}px - ${typeof heightOffset === 'number' ? `${heightOffset}px` : heightOffset})`,
|
||||||
overflowY: shouldAutoHeight.value ? 'auto' : 'unset',
|
overflowY: shouldAutoHeight.value ? 'auto' : 'unset',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative">
|
<div class="relative flex min-h-full flex-col">
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
description ||
|
description ||
|
||||||
|
|
@ -89,16 +89,10 @@ onMounted(() => {
|
||||||
<div :class="cn('h-full p-4', contentClass)" :style="contentStyle">
|
<div :class="cn('h-full p-4', contentClass)" :style="contentStyle">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="$slots.footer"
|
v-if="$slots.footer"
|
||||||
ref="footerRef"
|
ref="footerRef"
|
||||||
:class="
|
:class="cn('bg-card align-center flex px-6 py-4', footerClass)"
|
||||||
cn(
|
|
||||||
'bg-card align-center absolute bottom-0 left-0 right-0 flex px-6 py-4',
|
|
||||||
footerClass,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<slot name="footer"></slot>
|
<slot name="footer"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue