Skip to content

Commit ec8b86e

Browse files
committed
fix: resolve search box icon overlap issue
1 parent fc97232 commit ec8b86e

File tree

1 file changed

+17
-25
lines changed

1 file changed

+17
-25
lines changed

src/components/SearchBox.tsx

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -145,32 +145,24 @@ const SearchBox: React.FC<SearchBoxProps> = ({
145145
value={inputValue}
146146
onChange={handleInputChange}
147147
onSearch={(value: string) => debouncedSearch(value)}
148+
suffix={
149+
<Tooltip
150+
title={<SearchTooltip />}
151+
placement="bottomRight"
152+
color="white"
153+
overlayInnerStyle={{
154+
boxShadow: '0 3px 10px rgba(0,0,0,0.2)',
155+
borderRadius: '8px'
156+
}}
157+
>
158+
<InfoCircleOutlined
159+
style={{
160+
color: '#1890ff',
161+
}}
162+
/>
163+
</Tooltip>
164+
}
148165
/>
149-
150-
<Tooltip
151-
title={<SearchTooltip />}
152-
placement="bottomRight"
153-
color="white"
154-
overlayInnerStyle={{
155-
boxShadow: '0 3px 10px rgba(0,0,0,0.2)',
156-
borderRadius: '8px'
157-
}}
158-
>
159-
<Button
160-
type="text"
161-
icon={<InfoCircleOutlined />}
162-
style={{
163-
position: 'absolute',
164-
right: 50,
165-
top: '50%',
166-
transform: 'translateY(-50%)',
167-
color: '#1890ff',
168-
padding: '0 8px',
169-
border: 'none',
170-
background: 'transparent'
171-
}}
172-
/>
173-
</Tooltip>
174166
</div>
175167

176168
{/* 最近搜索记录 */}

0 commit comments

Comments
 (0)