fix: fix tool store search

This commit is contained in:
wangdan-fit2cloud 2025-10-10 16:23:40 +08:00
parent b60c471694
commit 0101370dc7

View File

@ -221,12 +221,16 @@ async function getStoreToolList() {
storeTools.forEach((tool: any) => {
tool.desc = tool.description
})
categories.value = tags.map((tag: any) => ({
id: tag.key,
title: tag.name, //
tools: storeTools.filter((tool: any) => tool.label === tag.key),
}))
if (searchValue.value.length) {
filterList.value = res.data.apps
} else {
filterList.value = null
categories.value = tags.map((tag: any) => ({
id: tag.key,
title: tag.name, //
tools: storeTools.filter((tool: any) => tool.label === tag.key),
}))
}
} catch (error) {
console.error(error)
}
@ -302,6 +306,7 @@ async function handleStoreAdd(tool: any) {
}
function radioChange() {
searchValue.value = ''
getList()
}