chore: access form test

This commit is contained in:
jialin
2026-02-03 18:21:08 +08:00
parent e188d788b9
commit 26e3a1944b
19 changed files with 622 additions and 323 deletions
+9 -1
View File
@@ -51,6 +51,13 @@ export default function useWatchList<T = Record<string, any>>(API: string) {
});
};
const handleDeleteItemFromCache = (id: number) => {
cacheWatchDataListRef.current = cacheWatchDataListRef.current.filter(
(item) => item.id !== id
);
setWatchDataList(cacheWatchDataListRef.current);
};
const getAllDataList = useMemoizedFn(async () => {
try {
listRequestTokenRef.current?.cancel?.();
@@ -78,6 +85,7 @@ export default function useWatchList<T = Record<string, any>>(API: string) {
}, []);
return {
watchDataList
watchDataList,
deleteItemFromCache: handleDeleteItemFromCache
};
}