mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-19 03:57:28 +08:00
feat: 优化类型处理
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user