mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 02:07:29 +08:00
feat: 优化类型处理
This commit is contained in:
@@ -113,7 +113,7 @@ import { useI18n } from 'vue-i18n';
|
||||
import { getMusicDetail } from '@/api/music';
|
||||
import SongItem from '@/components/common/SongItem.vue';
|
||||
import { usePlayerStore } from '@/store/modules/player';
|
||||
import { SongResult } from '@/type/music';
|
||||
import { SongResult } from '@/types/music';
|
||||
import { getImgUrl, isMobile, setAnimationClass } from '@/utils';
|
||||
|
||||
import PlayBottom from './common/PlayBottom.vue';
|
||||
|
||||
@@ -193,7 +193,7 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { getMvUrl } from '@/api/mv';
|
||||
import { IMvItem } from '@/type/mv';
|
||||
import { IMvItem } from '@/types/mv';
|
||||
|
||||
const { t } = useI18n();
|
||||
type PlayMode = 'single' | 'auto';
|
||||
|
||||
@@ -98,7 +98,7 @@ import { getMusicDetail } from '@/api/music';
|
||||
import SearchItem from '@/components/common/SearchItem.vue';
|
||||
import SongItem from '@/components/common/SongItem.vue';
|
||||
import { usePlayerStore, useSettingsStore } from '@/store';
|
||||
import { IArtist } from '@/type/artist';
|
||||
import { IArtist } from '@/types/artist';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
import PlayBottom from './PlayBottom.vue';
|
||||
|
||||
@@ -37,7 +37,7 @@ import { getAlbum, getListDetail } from '@/api/list';
|
||||
import MvPlayer from '@/components/MvPlayer.vue';
|
||||
import { useMusicStore } from '@/store/modules/music';
|
||||
import { usePlayerStore } from '@/store/modules/player';
|
||||
import { IMvItem } from '@/type/mv';
|
||||
import { IMvItem } from '@/types/mv';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
const props = withDefaults(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
|
||||
import CompactSongItem from './songItemCom/CompactSongItem.vue';
|
||||
import ListSongItem from './songItemCom/ListSongItem.vue';
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useSongItem } from '@/hooks/useSongItem';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { isElectron } from '@/utils';
|
||||
|
||||
import SongItemDropdown from './SongItemDropdown.vue';
|
||||
|
||||
@@ -108,7 +108,7 @@ import { NCheckbox, NEllipsis } from 'naive-ui';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { usePlayerStore } from '@/store';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
|
||||
import BaseSongItem from './BaseSongItem.vue';
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ import { NCheckbox, NEllipsis, NImage } from 'naive-ui';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { usePlayerStore } from '@/store';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
import BaseSongItem from './BaseSongItem.vue';
|
||||
|
||||
@@ -84,7 +84,7 @@ import { NCheckbox, NEllipsis, NImage } from 'naive-ui';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { usePlayerStore } from '@/store';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
import BaseSongItem from './BaseSongItem.vue';
|
||||
|
||||
@@ -19,7 +19,7 @@ import { NDropdown, NEllipsis, NImage } from 'naive-ui';
|
||||
import { computed, h, inject } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl, isElectron } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -96,7 +96,7 @@ import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { usePlayerStore } from '@/store';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
import BaseSongItem from './BaseSongItem.vue';
|
||||
|
||||
@@ -50,7 +50,7 @@ import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { getPlaylistCategory } from '@/api/home';
|
||||
import type { IPlayListSort } from '@/type/playlist';
|
||||
import type { IPlayListSort } from '@/types/playlist';
|
||||
import { setAnimationClass, setAnimationDelay } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -33,7 +33,7 @@ import { useRouter } from 'vue-router';
|
||||
import { getNewAlbum } from '@/api/home';
|
||||
import { getAlbum } from '@/api/list';
|
||||
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
|
||||
import type { IAlbumNew } from '@/type/album';
|
||||
import type { IAlbumNew } from '@/types/album';
|
||||
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -28,7 +28,7 @@ import { useI18n } from 'vue-i18n';
|
||||
import { getRecommendMusic } from '@/api/home';
|
||||
import SongItem from '@/components/common/SongItem.vue';
|
||||
import { usePlayerStore } from '@/store/modules/player';
|
||||
import type { IRecommendMusic } from '@/type/music';
|
||||
import type { IRecommendMusic } from '@/types/music';
|
||||
import { setAnimationClass, setAnimationDelay } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -137,11 +137,11 @@ import { getUserPlaylist } from '@/api/user';
|
||||
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
|
||||
import { useArtist } from '@/hooks/useArtist';
|
||||
import { usePlayerStore, useUserStore } from '@/store';
|
||||
import { IDayRecommend } from '@/type/day_recommend';
|
||||
import { Playlist } from '@/type/list';
|
||||
import type { IListDetail } from '@/type/listDetail';
|
||||
import { SongResult } from '@/type/music';
|
||||
import type { IHotSinger } from '@/type/singer';
|
||||
import { IDayRecommend } from '@/types/day_recommend';
|
||||
import { Playlist } from '@/types/list';
|
||||
import type { IListDetail } from '@/types/listDetail';
|
||||
import { SongResult } from '@/types/music';
|
||||
import type { IHotSinger } from '@/types/singer';
|
||||
import {
|
||||
getImgUrl,
|
||||
isMobile,
|
||||
|
||||
@@ -131,7 +131,7 @@ import { allTime, artistList, nowTime, playMusic } from '@/hooks/MusicHook';
|
||||
import { useArtist } from '@/hooks/useArtist';
|
||||
import { audioService } from '@/services/audioService';
|
||||
import { isBilibiliIdMatch, usePlayerStore, useSettingsStore } from '@/store';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
const playerStore = usePlayerStore();
|
||||
|
||||
@@ -63,7 +63,7 @@ import { useI18n } from 'vue-i18n';
|
||||
|
||||
import SongItem from '@/components/common/SongItem.vue';
|
||||
import { usePlayerStore } from '@/store/modules/player';
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { SongResult } from '@/types/music';
|
||||
import { isMobile } from '@/utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
Reference in New Issue
Block a user