From 408e79ff123f2ac08a16b85414e2bf4832acbce1 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 29 Sep 2025 15:34:30 +0800 Subject: [PATCH] refactor: rename categories to defaultCategories and initialize categories from it --- ui/src/views/tool/toolStore/ToolStoreDialog.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/views/tool/toolStore/ToolStoreDialog.vue b/ui/src/views/tool/toolStore/ToolStoreDialog.vue index 66db7afa5..6f4631946 100644 --- a/ui/src/views/tool/toolStore/ToolStoreDialog.vue +++ b/ui/src/views/tool/toolStore/ToolStoreDialog.vue @@ -128,8 +128,7 @@ const loading = ref(false) const searchValue = ref('') const folderId = ref('') const toolType = ref('INTERNAL') - -const categories = ref([ +const defaultCategories = ref([ // 第一版不上 // { // id: 'recommend', @@ -162,6 +161,8 @@ const categories = ref([ // tools: [] // } ]) +const categories = ref([...defaultCategories.value]) + const filterList = ref(null) function getSubTitle(tool: any) { @@ -188,6 +189,7 @@ async function getList() { async function getInternalToolList() { try { + categories.value = defaultCategories.value const res = await ToolStoreApi.getInternalToolList({ name: searchValue.value }, loading) if (searchValue.value.length) { filterList.value = res.data