Skip to content

Commit

Permalink
feat: alist search
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Nov 20, 2024
1 parent f7fce13 commit 8e76333
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/components/fileList/alist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ const openDialog = async () => {
const { execute, state, isLoading } = getAListFileList();
const getFileList = async (path: string, page: number, max: number) => {
const getFileList = async (path: string, page: number, max: number, keyword?: string) => {
try {
await execute({
headers: { Authorization: userToken.value },
data: {
path: path
path: path,
keyword: keyword || ""
},
params: {
page: page,
Expand Down Expand Up @@ -108,7 +109,7 @@ defineExpose({
:fileList="state"
@to-dir="getFileList"
:is-loading="isLoading"
:enable-search="false"
:enable-search="true"
>
<template #footer>
<el-button
Expand Down
4 changes: 2 additions & 2 deletions src/components/fileList/emby.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ const openDialog = async () => {
};
const { execute, state, isLoading } = getEmbyFileList();
const getFileList = async (path: string, page: number, max: number, keywords?: string) => {
const getFileList = async (path: string, page: number, max: number, keyword?: string) => {
try {
await execute({
headers: { Authorization: userToken.value },
data: {
path: path,
keywords: keywords || ""
keyword: keyword || ""
},
params: {
page: page,
Expand Down
2 changes: 1 addition & 1 deletion src/components/fileList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
toDir: [path: string, page: number, max: number, keywords?: string];
toDir: [path: string, page: number, max: number, keyword?: string];
}>();
const keywords = ref("");
Expand Down
2 changes: 2 additions & 0 deletions src/services/apis/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const getAListFileList = useDefineApi<
headers: { Authorization: string };
data: {
path: string;
keyword: string;
};
params: {
page: number;
Expand Down Expand Up @@ -290,6 +291,7 @@ export const getEmbyFileList = useDefineApi<
headers: { Authorization: string };
data: {
path: string;
keyword: string;
};
params: {
page: number;
Expand Down

0 comments on commit 8e76333

Please sign in to comment.