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
@@ -203,7 +203,7 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SearchItem from '@/components/common/SearchItem.vue';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store';
import { IArtist } from '@/type/artist';
import { IArtist } from '@/types/artist';
import { getImgUrl, isMobile } from '@/utils';
defineOptions({
@@ -108,8 +108,8 @@ import { useRoute, useRouter } from 'vue-router';
import { getBilibiliPlayUrl, getBilibiliProxyUrl, getBilibiliVideoDetail } from '@/api/bilibili';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { IBilibiliPage, IBilibiliVideoDetail } from '@/types/bilibili';
import type { SongResult } from '@/types/music';
import { setAnimationClass } from '@/utils';
defineOptions({
+1 -1
View File
@@ -429,7 +429,7 @@ import { useI18n } from 'vue-i18n';
import { getMusicDetail } from '@/api/music';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
const { t } = useI18n();
+1 -1
View File
@@ -105,7 +105,7 @@ import { getMusicDetail } from '@/api/music';
import SongItem from '@/components/common/SongItem.vue';
import { useDownload } from '@/hooks/useDownload';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isElectron, setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();
+1 -1
View File
@@ -40,7 +40,7 @@ import { getMusicDetail } from '@/api/music';
import SongItem from '@/components/common/SongItem.vue';
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();
const { delMusic, musicList } = useMusicHistory();
+3 -3
View File
@@ -66,9 +66,9 @@ import { useRoute, useRouter } from 'vue-router';
import { getPlaylistCategory } from '@/api/home';
import { getListByCat, getListDetail } from '@/api/list';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import type { IRecommendItem } from '@/type/list';
import type { IListDetail } from '@/type/listDetail';
import type { IPlayListSort } from '@/type/playlist';
import type { IRecommendItem } from '@/types/list';
import type { IListDetail } from '@/types/listDetail';
import type { IPlayListSort } from '@/types/playlist';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({
+1 -1
View File
@@ -107,7 +107,7 @@
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import ThemeColorPanel from '@/components/lyric/ThemeColorPanel.vue';
import { SongResult } from '@/type/music';
import { SongResult } from '@/types/music';
import {
getCurrentLyricThemeColor,
loadLyricThemeColor,
+1 -1
View File
@@ -232,7 +232,7 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SongItem from '@/components/common/SongItem.vue';
import { useDownload } from '@/hooks/useDownload';
import { useMusicStore, usePlayerStore } from '@/store';
import { SongResult } from '@/type/music';
import { SongResult } from '@/types/music';
import { getImgUrl, isElectron, isMobile, setAnimationClass } from '@/utils';
const { t } = useI18n();
+1 -1
View File
@@ -69,7 +69,7 @@ import { getAllMv, getTopMv } from '@/api/mv';
import MvPlayer from '@/components/MvPlayer.vue';
import { audioService } from '@/services/audioService';
import { usePlayerStore } from '@/store/modules/player';
import { IMvItem } from '@/type/mv';
import { IMvItem } from '@/types/mv';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({
+1 -1
View File
@@ -142,8 +142,8 @@ import SongItem from '@/components/common/SongItem.vue';
import { SEARCH_TYPE } from '@/const/bar-const';
import { usePlayerStore } from '@/store/modules/player';
import { useSearchStore } from '@/store/modules/search';
import type { IHotSearch } from '@/type/search';
import type { IBilibiliSearchResult } from '@/types/bilibili';
import type { IHotSearch } from '@/types/search';
import { isMobile, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({
+1 -1
View File
@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router';
import { getListDetail, getToplist } from '@/api/list';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import type { IListDetail } from '@/type/listDetail';
import type { IListDetail } from '@/types/listDetail';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({
+2 -2
View File
@@ -137,8 +137,8 @@ import { getUserDetail, getUserPlaylist, getUserRecord } from '@/api/user';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import type { Playlist } from '@/type/listDetail';
import type { IUserDetail } from '@/type/user';
import type { Playlist } from '@/types/listDetail';
import type { IUserDetail } from '@/types/user';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({
+1 -1
View File
@@ -73,7 +73,7 @@ import { useRoute, useRouter } from 'vue-router';
import { getUserFollowers } from '@/api/user';
import { useUserStore } from '@/store/modules/user';
import type { IUserFollow } from '@/type/user';
import type { IUserFollow } from '@/types/user';
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';
+1 -1
View File
@@ -73,7 +73,7 @@ import { useRoute, useRouter } from 'vue-router';
import { getUserFollows } from '@/api/user';
import { useUserStore } from '@/store/modules/user';
import type { IUserFollow } from '@/type/user';
import type { IUserFollow } from '@/types/user';
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';
+2 -2
View File
@@ -118,8 +118,8 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import { useUserStore } from '@/store/modules/user';
import type { Playlist } from '@/type/listDetail';
import type { IUserDetail } from '@/type/user';
import type { Playlist } from '@/types/listDetail';
import type { IUserDetail } from '@/types/user';
import { getImgUrl, isElectron, isMobile, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';
import LoginComponent from '@/views/login/index.vue';