mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-08 01:20:07 +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) {
|
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()
|
output, err := cmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
clearable
|
clearable
|
||||||
@clear="search()"
|
@clear="search()"
|
||||||
@keydown.enter="search()"
|
@keydown.enter="search()"
|
||||||
:placeholder="req.containSub ? $t('file.searchHelper') : $t('file.search')"
|
:placeholder="$t('file.search')"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<el-checkbox v-model="req.containSub">
|
<el-checkbox v-model="req.containSub">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user