This commit is contained in:
pengxiaolong
2025-07-03 19:14:34 +08:00
parent 01e9c26821
commit 52415dee0b
10 changed files with 622 additions and 498 deletions

View File

@@ -9,4 +9,29 @@ export const noticeStore = defineStore('noticeNum', {
this.data.num++;
},
},
});
});
export const tokenStore = defineStore('token', {
state: () => {
return { token: '' }
},
// 也可以这样定义
// state: () => ({ count: 0 })
actions: {
setToken(token){
this.token = token
}
},
})
export const UserStore = defineStore('User', {
state: () => {
return { user: {} }
},
// 也可以这样定义
// state: () => ({ count: 0 })
actions: {
setUser(user){
this.user = user
}
},
})