🎨 build framework completed

This commit is contained in:
landaiqing
2024-08-07 22:26:41 +08:00
parent 883afb315a
commit a4b502717c
29 changed files with 2733 additions and 183 deletions

32
src/store/modules/user.ts Normal file
View File

@@ -0,0 +1,32 @@
import {defineStore} from 'pinia'
import {ref} from 'vue'
export const useAuthStore = defineStore(
'user',
() => {
const user = ref<any>()
function setUser(data: any) {
user.value = data
}
function getUser() {
return user.value
}
function clearUser() {
user.value = void 0
}
return {
user,
setUser,
getUser,
clearUser
}
},
{
// 开启数据持久化
persist: true
}
)