@@ -25,7 +25,6 @@ export const TagEditorDialog: React.FC<TagEditorDialogProps> = ({
2525 const [ inputValue , setInputValue ] = useState ( '' )
2626 const [ allTags , setAllTags ] = useState < Tag [ ] > ( [ ] )
2727 const [ selectedTagIds , setSelectedTagIds ] = useState < Set < number > > ( new Set ( initialTagIds ) )
28- const [ loading , setLoading ] = useState ( false )
2928 const { currentTheme } = useTheme ( ) // 获取当前主题
3029
3130 const themeMode = currentTheme ?. mode || 'light' ; // 默认为 light
@@ -40,7 +39,6 @@ export const TagEditorDialog: React.FC<TagEditorDialogProps> = ({
4039
4140 const fetchAllTags = async ( ) => {
4241 if ( ! ( window as any ) . api ) return
43- setLoading ( true )
4442 try {
4543 const res = await ( window as any ) . api . tagsGetAll ( )
4644 if ( res . success && res . data ) {
@@ -49,8 +47,6 @@ export const TagEditorDialog: React.FC<TagEditorDialogProps> = ({
4947 } catch ( e ) {
5048 console . error ( 'Failed to fetch tags:' , e )
5149 MessagePlugin . error ( '获取标签列表失败' )
52- } finally {
53- setLoading ( false )
5450 }
5551 }
5652
@@ -119,12 +115,12 @@ export const TagEditorDialog: React.FC<TagEditorDialogProps> = ({
119115 }
120116 }
121117
122- const handleKeyDown = ( value : string , context : { e : React . KeyboardEvent < HTMLInputElement > } ) => {
118+ /* const handleKeyDown = (value: string, context: { e: React.KeyboardEvent<HTMLInputElement> }) => {
123119 if (context.e.key === 'Enter') {
124120 context.e.preventDefault()
125121 handleAddTag()
126122 }
127- }
123+ } */
128124
129125 const handleConfirm = ( ) => {
130126 onConfirm ( Array . from ( selectedTagIds ) )
0 commit comments