AppPage 应用页面布局
简洁的页面布局组件。提供带内边距的内容区,可选底部和返回顶部按钮。适合不需要复杂头部的简单页面。
基础用法
vue
<template>
<AppPage>
<p>页面内容</p>
</AppPage>
</template>
<script setup>
import AppPage from '@/components/common/AppPage.vue'
</script>Props
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
full | Boolean | false | 内容区域是否撑满剩余空间(flex: 1) |
showFooter | Boolean | false | 是否显示默认底部组件 TheFooter |
Slots
| 插槽名 | 说明 |
|---|---|
default | 页面主内容区域 |
footer | 自定义底部内容(优先级高于 showFooter 默认底部) |
与 CommonPage 的区别
| 组件 | 适用场景 | 特点 |
|---|---|---|
| AppPage | 简单页面、全屏页面 | 无头部,仅提供内容容器 + 底部 |
| CommonPage | 标准后台页面 | 有头部(标题/返回/操作按钮),内容区域可滚动 |
配合 SystemPageLayout 使用
vue
<SystemPageLayout>
<AppPage full show-footer>
<n-card title="欢迎页">
<p>这是首页内容</p>
</n-card>
</AppPage>
</SystemPageLayout>