2023-11-29 feat: 持久化缓存

This commit is contained in:
YunaiV
2024-02-29 23:14:47 +08:00
parent 8f14355903
commit 3be088e370
6 changed files with 10 additions and 11 deletions

View File

@ -10,7 +10,6 @@ interface LockState {
lockInfo: lockInfo
}
// TODO 芋艿:【锁屏】这里有报错,后续解决下
export const useLockStore = defineStore('lock', {
state: (): LockState => {
return {
@ -41,10 +40,7 @@ export const useLockStore = defineStore('lock', {
}
}
},
persist: {
enabled: true,
strategies: [{ key: 'lock', storage: localStorage }]
}
persist: true
})
export const useLockStoreWithOut = () => {