fix(login): 记住我同时记住密码并回填

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-29 09:58:57 +08:00
1 parent e2618735ba
commit 9a58b98f12
3 files changed
+7 -14

No files matched your search

+1 -11
View File
@@ -104,17 +104,7 @@ export const useUserStore = defineStore('user', {
this.loginInfo = loginInfo
}
},
persist: {
afterRestore: (context) => {
const loginInfo = context.store.loginInfo as
(UserLoginType & { password?: string }) | undefined
if (loginInfo?.password !== undefined) {
context.store.setLoginInfo(
loginInfo.username ? { username: loginInfo.username } : undefined
)
}
}
}
persist: true
})
export const useUserStoreWithOut = () => {