feat: 优化类型处理

This commit is contained in:
alger
2025-08-07 22:57:17 +08:00
parent daa8e7514d
commit 3ba85f34ed
62 changed files with 104 additions and 88 deletions
+3 -1
View File
@@ -22,7 +22,9 @@ function getLocalStorageItem<T>(key: string, defaultValue: T): T {
export const useUserStore = defineStore('user', () => {
// 状态
const user = ref<UserData | null>(getLocalStorageItem('user', null));
const loginType = ref<'token' | 'cookie' | 'qr' | 'uid' | null>(getLocalStorageItem('loginType', null));
const loginType = ref<'token' | 'cookie' | 'qr' | 'uid' | null>(
getLocalStorageItem('loginType', null)
);
const searchValue = ref('');
const searchType = ref(1);