mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-08 21:25:31 +08:00
bug:
This commit is contained in:
@@ -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()}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user