feat: 本次提交更新内容如下

基础框架完成,测试打包
This commit is contained in:
2025-07-17 22:42:24 +08:00
parent 9d18af22f1
commit f39a33819e
4 changed files with 58 additions and 28 deletions

View File

@@ -0,0 +1,16 @@
// src/store/createPersistStore.ts
import { create } from 'zustand';
import { persist, PersistOptions } from 'zustand/middleware';
export function createPersistStore<T>(
createState: (set: any, get: any) => T,
name: string,
partialize?: (state: T) => Partial<T>
) {
return create<T>()(
persist(createState, {
name,
partialize,
} as PersistOptions<T>)
);
}