mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-24 02:59:16 +08:00
fix: 解决搜索子目录模糊查询失败的问题 (#1085)
Refs https://github.com/1Panel-dev/1Panel/issues/1049
This commit is contained in:
parent
56f8caf561
commit
4fd87568cd
@ -99,7 +99,7 @@ func NewFileInfo(op FileOption) (*FileInfo, error) {
|
||||
}
|
||||
|
||||
func (f *FileInfo) search(search string, count int) (files []FileSearchInfo, total int, err error) {
|
||||
cmd := exec.Command("find", f.Path, "-name", search)
|
||||
cmd := exec.Command("find", f.Path, "-name", fmt.Sprintf("*%s*", search))
|
||||
output, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -90,7 +90,7 @@
|
||||
clearable
|
||||
@clear="search()"
|
||||
@keydown.enter="search()"
|
||||
:placeholder="req.containSub ? $t('file.searchHelper') : $t('file.search')"
|
||||
:placeholder="$t('file.search')"
|
||||
>
|
||||
<template #prepend>
|
||||
<el-checkbox v-model="req.containSub">
|
||||
|
Loading…
Reference in New Issue
Block a user