feat(experience-center): 统一侧栏与页头,优化云端大脑、图片和视频生成界面
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import React from 'react';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import UserCenterPageHeader from '../../../components/common/UserCenterPageHeader';
|
||||
import '../experience-page.css';
|
||||
|
||||
/**
|
||||
* 体验中心子页统一页头:复用用户中心页头规格(GLOBAL_UI_BASELINE 4.4 第 2 条),
|
||||
* 面包屑固定为“体验中心 / 当前页面”,标题 28 / 32px、副标题 14 / 22px、右侧操作走 extra。
|
||||
* 内容边距由各页根节点读取 --uc-page-pad-*,本组件只负责呈现。
|
||||
*
|
||||
* @param {{ title: string, titleSuffix?: React.ReactNode, subtitle?: React.ReactNode, extra?: React.ReactNode, className?: string }} props
|
||||
*/
|
||||
export default function ExperiencePageHeader({
|
||||
title,
|
||||
titleSuffix,
|
||||
subtitle,
|
||||
extra,
|
||||
className = '',
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<UserCenterPageHeader
|
||||
className={`exp-page-header ${className}`.trim()}
|
||||
breadcrumb={
|
||||
<Breadcrumb
|
||||
className='ui-dashboard-breadcrumb ui-user-center-breadcrumb'
|
||||
items={[{ title: t('体验中心') }, { title }]}
|
||||
/>
|
||||
}
|
||||
title={
|
||||
titleSuffix ? (
|
||||
<span className='exp-page-title-row'>
|
||||
<span>{title}</span>
|
||||
{titleSuffix}
|
||||
</span>
|
||||
) : (
|
||||
title
|
||||
)
|
||||
}
|
||||
subtitle={subtitle}
|
||||
extra={extra}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user