This commit is contained in:
2025-06-19 23:53:28 +08:00
parent 4ae87be385
commit 35525f61e6
2 changed files with 2 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ export default function Page() {
ossStore.setStore(store);
ossStore.setWorkDir(`tone-page/${data.userId}`)
ossStore.loadObjectList();
}, [storeMeta.stsTokenData]);
}, [storeMeta, storeMeta.stsTokenData]);
const handleRefreshFileList = async () => ossStore.loadObjectList().catch(e => toast.error(e.message));
const handleCheckboxChange = ossStore.handleObjectCheckedStateChanged.bind(ossStore);

View File

@@ -1,6 +1,4 @@
import { useOssStore } from "@/hooks/admin/web/blog/use-oss-store";
import { Dispatch, SetStateAction } from "react";
import { StsToken } from "../api/oss";
import OSS from "ali-oss";
export interface OssObjectItem {
@@ -86,7 +84,7 @@ export class OssStore {
let failedCount = 0;
for (const objectItem of objectItems) {
await this.deleteObject(objectItem).catch(e => failedCount++);
await this.deleteObject(objectItem).catch(() => failedCount++);
}
return { all: objectItems.length, failed: failedCount };