增加翻译缓存

This commit is contained in:
2026-01-06 19:11:21 +08:00
parent 06e90687f1
commit 504ecd259d
18 changed files with 556 additions and 246 deletions

View File

@@ -15,6 +15,7 @@ export const getLocalStorageOperator = <T extends z.ZodTypeAny>(
return {
get: (): z.infer<T> => {
try {
if (!globalThis.localStorage) return [] as z.infer<T>;
const item = globalThis.localStorage.getItem(key);
if (!item) return [] as z.infer<T>;