From 91935baa6f70898f6c3568ef6bd4f668222cf957 Mon Sep 17 00:00:00 2001 From: ikmkj <1@qq,com> Date: Wed, 6 Aug 2025 23:51:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(biji-qianduan):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E5=92=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了多余的错误处理代码 - 优化了 searchMarkdown 函数的返回值处理- 删除了不必要的空行和分号 --- biji-qianduan/src/components/HomePage.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/biji-qianduan/src/components/HomePage.vue b/biji-qianduan/src/components/HomePage.vue index 7ccf9ef..234da61 100644 --- a/biji-qianduan/src/components/HomePage.vue +++ b/biji-qianduan/src/components/HomePage.vue @@ -457,11 +457,9 @@ const fetchGroupings = async () => { const allCategories = await groupingAll(""); categoryTree.value = buildTree(allCategories || []); } catch (error) { - console.error('获取分组失败:', error); - ElMessage.error('获取分组失败: ' + error.message); categoryTree.value = []; } -}; +} const selectFile = async (data) => { try { @@ -864,7 +862,7 @@ const handleSearch = async () => { } try { const response = await searchMarkdown(searchKeyword.value); - groupMarkdownFiles.value = response.data || []; + groupMarkdownFiles.value = response || []; } catch (error) { ElMessage.error('搜索失败: ' + error.message); }