diff --git a/Web/src/views/ClassificationEdit.vue b/Web/src/views/ClassificationEdit.vue index cc61edf..0b797d8 100644 --- a/Web/src/views/ClassificationEdit.vue +++ b/Web/src/views/ClassificationEdit.vue @@ -398,7 +398,9 @@ const handleIconSelect = (category) => { * 生成新图标 */ const handleGenerateIcon = async () => { - if (!currentCategory.value) return + if (!currentCategory.value) { + return + } try { isGeneratingIcon.value = true @@ -435,7 +437,7 @@ const handleGenerateIcon = async () => { * 确认选择图标 */ const handleConfirmIconSelect = async () => { - if (!currentCategory.value) return + if (!currentCategory.value) {return} try { showLoadingToast({ @@ -475,7 +477,6 @@ const handleEditOld = (category) => { showEditDialog.value = true } - /** * 确认编辑 */ @@ -563,7 +564,7 @@ const resetAddForm = () => { * 解析图标数组(第一个图标为当前选中的) */ const parseIcon = (iconJson) => { - if (!iconJson) return '' + if (!iconJson) {return ''} try { const icons = JSON.parse(iconJson) return Array.isArray(icons) && icons.length > 0 ? icons[0] : '' @@ -576,7 +577,7 @@ const parseIcon = (iconJson) => { * 解析图标数组为完整数组 */ const parseIconArray = (iconJson) => { - if (!iconJson) return [] + if (!iconJson) {return []} try { const icons = JSON.parse(iconJson) return Array.isArray(icons) ? icons : []