diff --git a/src/components/filebrowser/FileList.vue b/src/components/filebrowser/FileList.vue index 553589cf..0fc92aaa 100644 --- a/src/components/filebrowser/FileList.vue +++ b/src/components/filebrowser/FileList.vue @@ -196,7 +196,7 @@ async function list_files() { } // 加载数据 - const data = ((await inProps.axios.request(config)) as any) ?? [] + const data = ((await inProps.axios.request(config))) ?? [] // 如果当前路径已经变化,则放弃此次加载结果 if (prevURI !== takeURISnapshot()) { return; @@ -300,7 +300,7 @@ async function download(item: FileItem) { responseType: 'blob', } // 加载数据 - const result: Blob = (await inProps.axios.request(config)) as any + const result: Blob = (await inProps.axios.request(config)) if (result) { const downloadUrl = URL.createObjectURL(result) window.open(downloadUrl, '_blank') @@ -318,7 +318,7 @@ async function getImgLink(item: FileItem) { responseType: 'blob', } // 加载二进制数据 - const result: Blob = (await inProps.axios.request(config)) as any + const result: Blob = (await inProps.axios.request(config)) if (result) { // 创建图片地址 currentImgLink.value = URL.createObjectURL(result) @@ -395,7 +395,7 @@ async function rename() { method: inProps.endpoints?.rename.method || 'post', data: currentItem.value, } - const result: { [key: string]: any } = (await inProps.axios?.request(config)) as any + const result: { [key: string]: any } = (await inProps.axios?.request(config)) if (!result.success) { $toast.error(result.message) } diff --git a/src/components/filebrowser/FileNavigator.vue b/src/components/filebrowser/FileNavigator.vue index 49bf714b..b69f23bb 100644 --- a/src/components/filebrowser/FileNavigator.vue +++ b/src/components/filebrowser/FileNavigator.vue @@ -131,7 +131,7 @@ async function loadSubdirectories(path: string) { data: fakeItem, } - const result = (await props.axios?.request(config)) as any + const result = (await props.axios?.request(config)) if (result && Array.isArray(result)) { // 过滤出目录项 const dirs = result.filter(item => item.type === 'dir')