This commit is contained in:
Your Name
2026-03-11 09:49:47 +08:00
parent 02ae537b4c
commit 38ad60f4bb
290 changed files with 36917 additions and 123 deletions
@@ -0,0 +1,27 @@
import type { ICustomStore } from '../../interface/store';
export default class CustomStore implements ICustomStore {
public store: any;
constructor() {
this.store = {};
}
update(key: string, data: any) {
this.store[key] = data;
}
getData(key: string) {
return this.store[key];
}
reset(keyList: string[] = []) {
if (keyList.length === 0) {
this.store = {};
}
this.store = {
...this.store,
...keyList.reduce((acc, key) => ({ ...acc, [key]: undefined }), {}),
};
}
}