This commit is contained in:
2023-01-13 10:54:34 +08:00
parent ab5cb8610b
commit edce7c4cc7
15 changed files with 30 additions and 29 deletions

View File

@@ -8,7 +8,7 @@ import { getUserInfo } from "../api"
export const useUserStore = defineStore("user", () => {
const { data: profile, isFinished, execute } = getUserInfo("")
const user = computed(() => profile.value.user || {})
const user = computed(() => profile?.value?.user ?? {})
const isAuthed = computed(() => !!user.value.email)
const isAdminRole = computed(
() =>