@@ -5,11 +5,10 @@ type SubPageHeaderProps = {
|
||||
|
||||
export default function SubPageHeader({ title, onBack }: SubPageHeaderProps) {
|
||||
return (
|
||||
<header className="sub-page-header">
|
||||
<header className="sub-page-header" aria-label={title}>
|
||||
<button type="button" className="sub-page-header-back" aria-label="返回" onClick={onBack}>
|
||||
<span className="material-symbols-outlined">arrow_back</span>
|
||||
</button>
|
||||
<h1 className="app-page-title">{title}</h1>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,13 @@ type TabMainHeaderProps = {
|
||||
};
|
||||
|
||||
export default function TabMainHeader({ title, extra, className = '' }: TabMainHeaderProps) {
|
||||
// H5:系统标题已展示;无右侧内容时整栏不渲染,避免顶部留白
|
||||
if (!extra) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<header className={`tab-main-header${className ? ` ${className}` : ''}`}>
|
||||
<h1 className="app-page-title">{title}</h1>
|
||||
<header className={`tab-main-header${className ? ` ${className}` : ''}`} aria-label={title}>
|
||||
{extra ? <div className="tab-main-header-extra">{extra}</div> : null}
|
||||
</header>
|
||||
);
|
||||
|
||||
@@ -917,6 +917,11 @@
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
/* 首页有城市栏顶栏时 top=56;无额外内容已不渲染顶栏时贴顶 */
|
||||
.home-page:not(:has(.tab-main-header)) .home-aroma-nav {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.home-aroma-tab {
|
||||
border: none;
|
||||
background: none;
|
||||
@@ -5926,3 +5931,20 @@
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* 微信 H5 系统标题已展示:隐藏页内重复标题;仅标题顶栏收起 */
|
||||
.app-page-title {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
header:has(> .app-page-title:only-child),
|
||||
.app-page-header:has(> .app-page-title:only-child) {
|
||||
display: none !important;
|
||||
height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user