File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
ui/src/views/tool/toolStore Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff 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
304308function radioChange() {
309+ searchValue .value = ' '
305310 getList ()
306311}
307312
You can’t perform that action at this time.
0 commit comments