Page Header 页头

当页面路径较简单时,推荐使用页头替代面包屑。

完整示例

Back
Title Sub title Default
Username kooriookami Telephone 18100000000 PlaceSuzhou
RemarksSchoolAddress No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province

Uniboot UI team uses weekly release strategy under normal circumstance, but critical bug fixes would require hotfix so the actual release number could be more than 1 per week.

基础用法

标准页头,适用于简单场景。

Back
Title

自定义图标

默认图标不满足时,可通过 icon 自定义。

Back
Title

无图标

页面元素较多、不需要图标时,将 icon 设为 "" 即可隐藏。

Back
Title

面包屑

通过 breadcrumb 插槽添加面包屑,为用户提供路由信息。

Back
Title

额外操作区

页头可扩展额外区域以承载更丰富的交互。

Back
Title Sub title Default

主内容区

需要与标题配套展示内容时,可使用默认插槽。

Back
Title
Your additional content can be added with default slot, You may put as many content as you want here.

图片风格头部

使用 header 插槽可以完全接管第一行头部,从而封装出类似设计稿中的图片风格顶栏。

Masslink
U用户名

结构说明

组件由以下部分组成:

vue
<template>
  <u-page-header>
    <!-- 第一行 -->
    <template #breadcrumb />
    <!-- 第二行 -->
    <template #header />
    <template #icon />
    <template #title />
    <template #content />
    <template #extra />
    <!-- 第二行之后 -->
    <template #default />
  </u-page-header>
</template>

页头 API

页头 属性

名称说明类型默认值
icon图标组件,默认内置返回图标并兼顾无障碍string / ComponentBack
title主标题,默认内置「返回」文案并兼顾无障碍string''
content副标题/描述内容string''

页头 事件

名称说明类型
back点击右侧区域时Function

页头 插槽

名称说明
header整行自定义
icon图标区域
title标题区域
content内容区域
extra额外操作区
breadcrumb面包屑区域
default主内容区