code refactor

This commit is contained in:
MaysWind
2025-01-11 13:59:47 +08:00
parent 61f26e060e
commit 89b233e51b
25 changed files with 128 additions and 128 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { type Ref, ref, computed } from 'vue';
import { ref, computed } from 'vue';
import { defineStore } from 'pinia';
import { useSettingsStore } from './setting.ts';
@@ -33,7 +33,7 @@ import services from '@/lib/services.ts';
export const useUserStore = defineStore('user', () => {
const settingsStore = useSettingsStore();
const currentUserBasicInfo: Ref<UserBasicInfo | null> = ref(getCurrentUserInfo());
const currentUserBasicInfo = ref<UserBasicInfo | null>(getCurrentUserInfo());
const currentUserNickname = computed<string | null>(() => {
const userInfo = currentUserBasicInfo.value || EMPTY_USER_BASIC_INFO;