This commit is contained in:
阿梓喵_あずにゃん committed 2026-04-20 23:48:46 +08:00
1 parent 1bd6ab9975
commit 47514f57aa
9 files changed
+91 -104

No files matched your search

+5 -3
View File
@@ -19,8 +19,8 @@
:song="song"
:index="i + 1"
:active="store.currentSong?.id === song.id"
@play="store.play(song.name, song.platform)"
@add="store.addToQueue(song.name, song.platform)"
@play="store.playSong(song)"
@add="store.addSong(song)"
/>
</div>
</div>
@@ -35,7 +35,9 @@ import SongCard from '../components/SongCard.vue';
const store = usePlayerStore();
const history = ref<Array<{ id: string; name: string; artist: string; album: string; duration: number; coverUrl: string; platform: string }>>([]);
import { Song } from '../stores/player.js';
const history = ref<Song[]>([]);
const loading = ref(true);
onMounted(async () => {
+2 -2
View File
@@ -41,7 +41,7 @@
v-for="song in store.dailySongs.slice(0, 12)"
:key="song.id"
class="daily-card hover-scale"
@click="store.playById(song.id, song.platform)"
@click="store.playSong(song)"
>
<CoverArt :url="song.coverUrl" :size="120" :radius="10" :show-shadow="true" />
<div class="daily-name">{{ song.name }}</div>
@@ -105,7 +105,7 @@
v-for="song in store.bilibiliPopular.slice(0, 12)"
:key="song.id"
class="daily-card hover-scale"
@click="store.playById(song.id, song.platform)"
@click="store.playSong(song)"
>
<CoverArt :url="song.coverUrl" :size="120" :radius="10" :show-shadow="true" />
<div class="daily-name">{{ song.name }}</div>
+5 -13
View File
@@ -31,8 +31,8 @@
:song="song"
:index="i + 1"
:active="store.currentSong?.id === song.id"
@play="store.playById(song.id, song.platform)"
@add="store.addToQueueById(song.id, song.platform)"
@play="store.playSong(song)"
@add="store.addSong(song)"
/>
</div>
</template>
@@ -53,6 +53,8 @@ import SongCard from '../components/SongCard.vue';
const store = usePlayerStore();
const route = useRoute();
import { Song } from '../stores/player.js';
interface PlaylistDetail {
id: string;
name: string;
@@ -61,18 +63,8 @@ interface PlaylistDetail {
songCount: number;
}
interface SongItem {
id: string;
name: string;
artist: string;
album: string;
duration: number;
coverUrl: string;
platform: string;
}
const playlist = ref<PlaylistDetail | null>(null);
const songs = ref<SongItem[]>([]);
const songs = ref<Song[]>([]);
const loading = ref(true);
async function playAll() {
+5 -3
View File
@@ -27,8 +27,8 @@
:song="song"
:index="i + 1"
:active="store.currentSong?.id === song.id"
@play="store.playById(song.id, song.platform)"
@add="store.addToQueueById(song.id, song.platform)"
@play="store.playSong(song)"
@add="store.addSong(song)"
/>
</div>
@@ -50,7 +50,9 @@ const store = usePlayerStore();
const route = useRoute();
const query = ref((route.query.q as string) || '');
const results = ref<Array<{ id: string; name: string; artist: string; album: string; duration: number; coverUrl: string; platform: string }>>([]);
import { Song } from '../stores/player.js';
const results = ref<Song[]>([]);
const loading = ref(false);
const searched = ref(false);