This commit is contained in:
eleanor.mao 2025-05-20 22:55:48 +08:00
parent fc37a612cc
commit 276107722e
2 changed files with 36 additions and 12 deletions

View File

@ -1,7 +1,7 @@
@import '@/styles/variables.less';
.search-city {
background: #FFF;
background: #fff;
&__position-title {
font-size: 24px;
@ -35,7 +35,7 @@
align-content: space-between;
width: 630px;
padding: 12px 90px 26px 30px;
background: #FFFFFF;
background: #ffffff;
}
&__hot-city-item {
@ -57,7 +57,8 @@
padding-bottom: env(safe-area-inset-bottom);
}
&__indexes-fragment {}
&__indexes-fragment {
}
&__indexes-anchor {
height: 48px;
@ -117,7 +118,27 @@
text-align: center;
line-height: 160px;
font-size: 70px;
color: #FFFFFF;
color: #ffffff;
background-color: rgba(0, 0, 0, 0.5);
}
&__search-wrapper {
&.group {
background: linear-gradient(2.75deg, #ffffff 7.9%, #f2edff 97.24%);
.search-city__search {
background-color: transparent;
.taroify-search__content--rounded {
border: @blHighlightColor 1px solid;
}
}
}
}
&__banner {
padding: 32px 24px 0;
text-align: center;
font-size: 28px;
line-height: 40px;
color: @blHighlightColor;
}
}

View File

@ -133,12 +133,15 @@ export default function SearchCity({ onSelectCity, currentCity = '', forGroup =
return (
<div className={PREFIX}>
<ScrollView scrollY style={{ height: winHeight - offset }} scrollIntoView={touchAnchor}>
<Search
className={`${PREFIX}__search`}
placeholder="输入城市名称"
shape="rounded"
onChange={handleSearchChange}
/>
<div className={`${PREFIX}__search-wrapper ${forGroup ? 'group' : ''}`}>
{forGroup && <div className={`${PREFIX}__banner`}></div>}
<Search
className={`${PREFIX}__search`}
placeholder="输入城市名称"
shape="rounded"
onChange={handleSearchChange}
/>
</div>
{showSearchList && (
<div className={`${PREFIX}__search-list`}>
{searchResult.map(city => (
@ -202,7 +205,7 @@ export default function SearchCity({ onSelectCity, currentCity = '', forGroup =
onTouchMove={handleTouchMove}
onTouchEnd={handleTouchEnd}
onTouchCancel={handleTouchEnd}
style={{ top: indexItemHeight * OFFSET_INDEX_SIZE }}
style={{ top: indexItemHeight * OFFSET_INDEX_SIZE + offset }}
>
{CITY_LIST.map(item => {
return (