1+ import AnimatedIcon from '@stateless/AnimatedIcon'
12import React , { useState , useRef , useEffect , KeyboardEvent } from 'react'
23import { Modal , Input , Avatar , InputRef , theme } from 'antd'
34import Draggable , { DraggableData , DraggableEvent } from 'react-draggable'
@@ -256,7 +257,11 @@ const SearchRow: React.FC<SearchRowProps> = ({ entry, idx, isActive, isDark, tok
256257 >
257258 { item . key }
258259 </ span >
259- { isActive && < EnterOutlined style = { { color : isDark ? '#666' : '#999' , marginLeft : 12 } } /> }
260+ { isActive && (
261+ < AnimatedIcon variant = "spin" mode = "hover" >
262+ < EnterOutlined style = { { color : isDark ? '#666' : '#999' , marginLeft : 12 } } />
263+ </ AnimatedIcon >
264+ ) }
260265 </ button >
261266 )
262267}
@@ -536,7 +541,15 @@ const GlobalSearchView: React.FC<GlobalSearchViewProps> = ({
536541 } }
537542 title = { isFullscreen ? '退出全屏' : '全屏' }
538543 >
539- { isFullscreen ? < FullscreenExitOutlined /> : < FullscreenOutlined /> }
544+ { isFullscreen ? (
545+ < AnimatedIcon variant = "spin" mode = "hover" >
546+ < FullscreenExitOutlined />
547+ </ AnimatedIcon >
548+ ) : (
549+ < AnimatedIcon variant = "spin" mode = "hover" >
550+ < FullscreenOutlined />
551+ </ AnimatedIcon >
552+ ) }
540553 </ button >
541554 < button
542555 type = "button"
@@ -552,15 +565,20 @@ const GlobalSearchView: React.FC<GlobalSearchViewProps> = ({
552565 } }
553566 title = "关闭"
554567 >
555- < CloseOutlined />
568+ < AnimatedIcon variant = "spin" mode = "hover" >
569+ < CloseOutlined />
570+ </ AnimatedIcon >
556571 </ button >
557572 </ div >
558573 </ div >
559-
560574 < div style = { { padding : '16px 24px' , flexShrink : 0 } } >
561575 < Input
562576 ref = { inputRef }
563- prefix = { < SearchOutlined style = { { color : palette . inputPrefixColor } } /> }
577+ prefix = {
578+ < AnimatedIcon variant = "spin" mode = "hover" >
579+ < SearchOutlined style = { { color : palette . inputPrefixColor } } />
580+ </ AnimatedIcon >
581+ }
564582 placeholder = "请输入...(支持中文、拼音及英文)"
565583 title = "请输入...(支持中文、拼音及英文)"
566584 value = { inputValue }
@@ -580,7 +598,6 @@ const GlobalSearchView: React.FC<GlobalSearchViewProps> = ({
580598 } }
581599 />
582600 </ div >
583-
584601 < div
585602 ref = { listRef }
586603 style = { {
@@ -616,7 +633,6 @@ const GlobalSearchView: React.FC<GlobalSearchViewProps> = ({
616633 ) )
617634 ) }
618635 </ div >
619-
620636 < div
621637 style = { {
622638 padding : '12px 24px' ,
@@ -632,11 +648,19 @@ const GlobalSearchView: React.FC<GlobalSearchViewProps> = ({
632648 } }
633649 >
634650 < span style = { { display : 'flex' , alignItems : 'center' , gap : 4 } } >
635- < ArrowUpOutlined style = { { fontSize : 10 } } />
636- < ArrowDownOutlined style = { { fontSize : 10 } } /> 导航
651+ < AnimatedIcon variant = "spin" mode = "hover" >
652+ < ArrowUpOutlined style = { { fontSize : 10 } } />
653+ </ AnimatedIcon >
654+ < AnimatedIcon variant = "spin" mode = "hover" >
655+ < ArrowDownOutlined style = { { fontSize : 10 } } />
656+ </ AnimatedIcon > { ' ' }
657+ 导航
637658 </ span >
638659 < span style = { { display : 'flex' , alignItems : 'center' , gap : 4 } } >
639- < EnterOutlined style = { { fontSize : 10 , color : palette . enterIcon } } /> 选择
660+ < AnimatedIcon variant = "spin" mode = "hover" >
661+ < EnterOutlined style = { { fontSize : 10 , color : palette . enterIcon } } />
662+ </ AnimatedIcon > { ' ' }
663+ 选择
640664 </ span >
641665 < span style = { { display : 'flex' , alignItems : 'center' , gap : 4 } } >
642666 < span
0 commit comments