PageHeader 页头
在页面顶部显示标题和操作。
基础用法
使用 title 设置主标题,在 actions 插槽中放置按钮。
查看代码收起代码
vue
<script setup lang="ts">
import { ZIconButton, ZPageHeader } from '@codex-proxy/ui'
import { RefreshCw } from '@lucide/vue'
import { shallowRef } from 'vue'
const refreshed = shallowRef(0)
</script>
<template>
<ZPageHeader title="配置管理" :description="`已刷新 ${refreshed} 次`">
<template #actions>
<ZIconButton aria-label="刷新配置" @click="refreshed++">
<RefreshCw :size="16" />
</ZIconButton>
</template>
</ZPageHeader>
</template>PageHeader API
属性
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
title | 页面标题 | string | 必填 |
description | 辅助说明 | string | — |
插槽
| 插槽 | 说明 |
|---|---|
description | 替换说明内容 |
actions | 页头操作 |