Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/effects/common-ui/src/components/page/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineOptions({
name: 'Page',
});

const { autoContentHeight = false } = defineProps<PageProps>();
const { autoContentHeight = false, height = 0 } = defineProps<PageProps>();

const headerHeight = ref(0);
const footerHeight = ref(0);
Expand All @@ -24,7 +24,7 @@ const footerRef = useTemplateRef<HTMLDivElement>('footerRef');
const contentStyle = computed<StyleValue>(() => {
if (autoContentHeight) {
return {
height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px)`,
height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${height}px)`,
overflowY: shouldAutoHeight.value ? 'auto' : 'unset',
};
}
Expand Down
1 change: 1 addition & 0 deletions packages/effects/common-ui/src/components/page/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export interface PageProps {
autoContentHeight?: boolean;
headerClass?: string;
footerClass?: string;
height?: number | string;
}
Loading