添加修改头像功能

This commit is contained in:
Jerry
2024-08-15 14:55:26 +08:00
parent 8a64b28099
commit 3599f28910
10 changed files with 112 additions and 14 deletions

View File

@@ -19,6 +19,10 @@ export default defineStore('login', {
setUserInfo(info: UserInfo) {
this.userInfo = initUserInfo(info);
},
setHeadImage(headImage: (string & { downloadUri: string; filename: string }) | null) {
if (this.userInfo == null) return;
this.userInfo.headImageUrl = headImage;
},
},
persist: {
// 开启持久存储