页面级标题组件,支持标题、描述和右侧操作区。
<template>
<FaPageHeader title="页面标题" description="页面描述" />
</template>| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
title | string | - | 页面标题 |
description | string | - | 页面描述 |
class | HTMLAttributes['class'] | - | 容器 CSS 类 |
mainClass | HTMLAttributes['class'] | - | 主内容区(标题+描述)CSS 类 |
defaultClass | HTMLAttributes['class'] | - | 右侧操作区 CSS 类 |
| 名称 | 说明 |
|---|---|
title | 自定义标题内容 |
description | 自定义描述内容 |
default | 右侧操作区内容(按钮等) |
无
<template>
<FaPageHeader title="用户管理" />
</template><template>
<FaPageHeader
title="用户管理"
description="管理系统用户信息和权限"
/>
</template><template>
<FaPageHeader>
<template #title>
<span class="flex items-center gap-2">
<FaIcon name="i-lucide:user" />
用户管理
</span>
</template>
</FaPageHeader>
</template><template>
<FaPageHeader title="用户管理" description="管理系统用户">
<FaButton>
<FaIcon name="i-lucide:plus" />
新增用户
</FaButton>
</FaPageHeader>
</template><template>
<FaPageHeader title="数据报表">
<div class="flex gap-2">
<FaButton variant="outline">
<FaIcon name="i-lucide:download" />
导出
</FaButton>
<FaButton>
<FaIcon name="i-lucide:refresh-cw" />
刷新
</FaButton>
</div>
</FaPageHeader>
</template><template>
<FaPageHeader
title="自定义样式"
class="bg-primary text-primary-foreground"
main-class="text-center"
>
<template #description>
<span class="opacity-70">自定义描述的样式</span>
</template>
</FaPageHeader>
</template>FaPageMain 组件上方使用