Skip to content

Commit c64abc0

Browse files
committed
过下类型检查
1 parent 5ca46fd commit c64abc0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/renderer/src/components/TagEditorDialog.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)