From c64abc070eb88c0a1cf1d39642290094fe53c617 Mon Sep 17 00:00:00 2001 From: NanGua-QWQ Date: Thu, 12 Feb 2026 22:21:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E4=B8=8B=E7=B1=BB=E5=9E=8B=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/TagEditorDialog.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/TagEditorDialog.tsx b/src/renderer/src/components/TagEditorDialog.tsx index 2bf0a2d..83becbf 100644 --- a/src/renderer/src/components/TagEditorDialog.tsx +++ b/src/renderer/src/components/TagEditorDialog.tsx @@ -25,7 +25,6 @@ export const TagEditorDialog: React.FC = ({ const [inputValue, setInputValue] = useState('') const [allTags, setAllTags] = useState([]) const [selectedTagIds, setSelectedTagIds] = useState>(new Set(initialTagIds)) - const [loading, setLoading] = useState(false) const { currentTheme } = useTheme() // 获取当前主题 const themeMode = currentTheme?.mode || 'light'; // 默认为 light @@ -40,7 +39,6 @@ export const TagEditorDialog: React.FC = ({ const fetchAllTags = async () => { if (!(window as any).api) return - setLoading(true) try { const res = await (window as any).api.tagsGetAll() if (res.success && res.data) { @@ -49,8 +47,6 @@ export const TagEditorDialog: React.FC = ({ } catch (e) { console.error('Failed to fetch tags:', e) MessagePlugin.error('获取标签列表失败') - } finally { - setLoading(false) } } @@ -119,12 +115,12 @@ export const TagEditorDialog: React.FC = ({ } } - const handleKeyDown = (value: string, context: { e: React.KeyboardEvent }) => { +/* const handleKeyDown = (value: string, context: { e: React.KeyboardEvent }) => { if (context.e.key === 'Enter') { context.e.preventDefault() handleAddTag() } - } + } */ const handleConfirm = () => { onConfirm(Array.from(selectedTagIds))