Files
scriptcat-mv3/src/app/repo/localStorage.ts
2025-04-16 14:01:26 +08:00

18 lines
396 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Repo } from "./repo";
export interface LocalStorageItem {
key: string;
value: any;
}
// 由于service worker不能使用localStorage这里新建一个类来实现localStorage的功能
export class LocalStorageDAO extends Repo<LocalStorageItem> {
constructor() {
super("localStorage");
}
save(value: LocalStorageItem) {
return super._save(value.key, value);
}
}