Skip to content

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页头操作