2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-07 09:27:15 +08:00

feat: 文件搜索

This commit is contained in:
耗子
2024-10-20 18:51:05 +08:00
parent a2ebc070ae
commit f9233bd36b
10 changed files with 397 additions and 63 deletions

View File

@@ -50,8 +50,14 @@ export default {
unCompress: (file: string, path: string): Promise<AxiosResponse<any>> =>
request.post('/file/unCompress', { file, path }),
// 搜索文件
search: (keyword: string): Promise<AxiosResponse<any>> =>
request.post('/file/search', { keyword }),
search: (
path: string,
keyword: string,
sub: boolean,
page: number,
limit: number
): Promise<AxiosResponse<any>> =>
request.get('/file/search', { params: { path, keyword, sub, page, limit } }),
// 获取文件列表
list: (path: string, page: number, limit: number, sort: string): Promise<AxiosResponse<any>> =>
request.get('/file/list', { params: { path, page, limit, sort } })