This commit is contained in:
zhangjing1
2026-03-13 13:19:21 +08:00
parent 520c4d9025
commit 4a632c78bc
2 changed files with 22 additions and 5 deletions

View File

@@ -205,12 +205,14 @@ const CustomNavigationHeader = memo((props) => {
<View className='wgt-page' style={styleNames(headerStyle())} onClick={props.onClickHeader}>
<View className='wgt-page-content'>
<View
className={classNames('header-container', { 'has-nearby': hasNearby })}
className={classNames('header-container', { 'has-nearby': hasNearby, 'is-web': isWeb })}
style={styleNames({ width: `calc(100% - ${navigationRSpace}px)`,...(showHeaderContent ? containerStyle() : {})})}
>
{showNavitionLeft && <View className={
classNames('header-container-left', { 'is-web': isWeb })
} style={styleNames({ width:`${navigationRSpace}px` })}>
{showNavitionLeft && (
<View
className={classNames('header-container-left', { 'is-web': isWeb })}
style={styleNames({ width: `${navigationRSpace}px` })}
>
{/* 左侧:返回、首页、功能区三者只显示一个 */}
{showHeaderContent && showFunctionArea ? (
<>
@@ -232,7 +234,8 @@ const CustomNavigationHeader = memo((props) => {
)}
</>
)}
</View>}
</View>
)}
<View className='title-container' style={styleNames({ paddingLeft: !showNavitionLeft ? `20rpx` : `0` })}>
{/* 标题区:搜索 */}
{showHeaderContent && titleStyle === '3' && renderSearch()}

View File

@@ -154,6 +154,20 @@
box-sizing: border-box;
justify-content: flex-start;
/* Web 端:标题区保持 flex 布局,仅保证居中不撑满;左侧占位用 min-width 避免标题偏右 */
&.is-web .header-container-left {
min-width: 80px; /* 与左侧返回/首页按钮区域对称,标题视觉居中 */
}
&.is-web .title-container {
padding-left: 0;
}
&.is-web .title-search {
flex: 1;
min-width: 0;
max-width: 600px;
margin: 0 auto;
}
.nav-left-capsule {
flex-shrink: 0;
}