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
+1 -1
View File
@@ -9,7 +9,7 @@ import { getBilibiliAudioUrl } from '@/api/bilibili';
import { getLikedList, getMusicLrc, getMusicUrl, getParsingMusicUrl, likeSong } from '@/api/music';
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
import { audioService } from '@/services/audioService';
import type { ILyric, ILyricText, SongResult } from '@/type/music';
import type { ILyric, ILyricText, SongResult } from '@/types/music';
import { type Platform } from '@/types/music';
import { getImgUrl } from '@/utils';
import { getImageLinearBackground } from '@/utils/linearColor';
+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);