Skip to content

Commit 7f9ab8d

Browse files
wangdan-fit2cloudliuruibin
authored andcommitted
fix: fix tool store search
1 parent 12f76b1 commit 7f9ab8d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

ui/src/views/tool/toolStore/ToolStoreDialog.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,16 @@ async function getStoreToolList() {
221221
storeTools.forEach((tool: any) => {
222222
tool.desc = tool.description
223223
})
224-
225-
categories.value = tags.map((tag: any) => ({
226-
id: tag.key,
227-
title: tag.name, // 国际化
228-
tools: storeTools.filter((tool: any) => tool.label === tag.key),
229-
}))
224+
if (searchValue.value.length) {
225+
filterList.value = res.data.apps
226+
} else {
227+
filterList.value = null
228+
categories.value = tags.map((tag: any) => ({
229+
id: tag.key,
230+
title: tag.name, // 国际化
231+
tools: storeTools.filter((tool: any) => tool.label === tag.key),
232+
}))
233+
}
230234
} catch (error) {
231235
console.error(error)
232236
}
@@ -302,6 +306,7 @@ async function handleStoreAdd(tool: any) {
302306
}
303307
304308
function radioChange() {
309+
searchValue.value = ''
305310
getList()
306311
}
307312

0 commit comments

Comments
 (0)