mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 07:09:20 +08:00
feat: 新增工作台静态页面设计
This commit is contained in:
@@ -12,8 +12,11 @@ defineOptions({
|
||||
name: 'Page',
|
||||
});
|
||||
|
||||
const { autoContentHeight = false, heightOffset = 0 } =
|
||||
defineProps<PageProps>();
|
||||
const {
|
||||
autoContentHeight = false,
|
||||
contentPaddingClass,
|
||||
heightOffset = 0,
|
||||
} = defineProps<PageProps>();
|
||||
|
||||
const headerHeight = ref(0);
|
||||
const footerHeight = ref(0);
|
||||
@@ -86,7 +89,10 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="cn('h-full p-4', contentClass)" :style="contentStyle">
|
||||
<div
|
||||
:class="cn('h-full', contentPaddingClass ?? 'p-4', contentClass)"
|
||||
:style="contentStyle"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
export interface PageProps {
|
||||
title?: string;
|
||||
description?: string;
|
||||
/**
|
||||
* 内容区内边距(Tailwind 工具类)。默认 `p-4`;可改为如 `px-4 pb-4` 去掉上内边距等。
|
||||
*/
|
||||
contentPaddingClass?: string;
|
||||
contentClass?: string;
|
||||
/**
|
||||
* 根据content可见高度自适应
|
||||
|
||||
Reference in New Issue
Block a user