feat: search city

This commit is contained in:
eleanor.mao 2025-05-20 23:19:46 +08:00
parent 276107722e
commit 74579f09e3
2 changed files with 25 additions and 1 deletions

View File

@ -1,4 +1,5 @@
@import '@/styles/variables.less';
@import '@/styles/common.less';
.search-city {
background: #fff;
@ -140,5 +141,22 @@
font-size: 28px;
line-height: 40px;
color: @blHighlightColor;
.flex-row();
.text {
padding: 0 12px;
flex: 0 1 auto;
}
.dash {
height: 1px;
flex: 1;
&:first-child {
background: linear-gradient(270deg, #6d3df5 0%, #f7f4ff 100%);
}
&:last-child {
background: linear-gradient(90deg, #6d3df5 0%, #f7f4ff 100%);
}
}
}
}

View File

@ -134,7 +134,13 @@ export default function SearchCity({ onSelectCity, currentCity = '', forGroup =
<div className={PREFIX}>
<ScrollView scrollY style={{ height: winHeight - offset }} scrollIntoView={touchAnchor}>
<div className={`${PREFIX}__search-wrapper ${forGroup ? 'group' : ''}`}>
{forGroup && <div className={`${PREFIX}__banner`}></div>}
{forGroup && (
<div className={`${PREFIX}__banner`}>
<div className="dash"></div>
<div className="text"></div>
<div className="dash"></div>
</div>
)}
<Search
className={`${PREFIX}__search`}
placeholder="输入城市名称"