Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/renderer/components/lyric/MusicFull.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
zIndex: 99999
}"
>
<span
v-for="(item, index) in artistList"
:key="index"
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(item.id)"
>
{{ item.name }}
{{ index < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(item, index) in artistList" :key="index">
<span
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(item.id)"
>
{{ item.name }}
</span>
<span>{{ index < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</n-ellipsis>
</div>
<simple-play-bar
Expand Down Expand Up @@ -100,15 +100,15 @@
>
<div class="music-info-name" v-html="playMusic.name"></div>
<div class="music-info-singer">
<span
v-for="(item, index) in artistList"
:key="index"
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(item.id)"
>
{{ item.name }}
{{ index < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(item, index) in artistList" :key="index">
<span
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(item.id)"
>
{{ item.name }}
</span>
<span>{{ index < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</div>
</div>
<!-- 无时间戳歌词提示 -->
Expand Down
36 changes: 16 additions & 20 deletions src/renderer/components/lyric/MusicFullMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<div class="fullscreen-header">
<div class="song-title" v-html="playMusic.name"></div>
<div class="artist-name">
<span v-for="(item, index) in artistList" :key="index">
{{ item.name }}{{ index < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(item, index) in artistList" :key="index">
<span>{{ item.name }}</span>
<span>{{ index < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</div>
</div>

Expand Down Expand Up @@ -119,15 +120,12 @@
<h1 class="song-title" v-html="playMusic.name"></h1>
</div>
<p class="song-artist">
<span
v-for="(item, index) in artistList"
:key="index"
class="artist-name"
@click="handleArtistClick(item.id)"
>
{{ item.name }}
{{ index < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(item, index) in artistList" :key="index">
<span class="artist-name" @click="handleArtistClick(item.id)">
{{ item.name }}
</span>
<span> {{ index < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</p>
<div class="favorite-icon" @click="toggleFavorite">
<i class="ri-heart-3-fill" :class="{ favorite: isFavorite }"></i>
Expand Down Expand Up @@ -226,14 +224,12 @@
<div class="flex flex-col flex-1">
<h1 class="song-title" v-html="playMusic.name"></h1>
<p class="song-artist">
<span
v-for="(item, index) in artistList"
:key="index"
class="artist-name"
@click="handleArtistClick(item.id)"
>
{{ item.name }}{{ index < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(item, index) in artistList" :key="index">
<span class="artist-name" @click="handleArtistClick(item.id)">
{{ item.name }}
</span>
<span>{{ index < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</p>
</div>
<div class="favorite-icon landscape" @click="toggleFavorite">
Expand Down
17 changes: 9 additions & 8 deletions src/renderer/components/player/MiniPlayBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
<div class="song-info" @click="setMusicFull">
<div class="song-title" v-html="playMusic?.name || '未播放'"></div>
<div class="song-artist">
<span
v-for="(artists, artistsindex) in artistList"
:key="artistsindex"
class="cursor-pointer hover:text-green-500"
@click.stop="handleArtistClick(artists.id)"
>
{{ artists.name }}{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(artists, artistsindex) in artistList" :key="artistsindex">
<span
class="cursor-pointer hover:text-green-500"
@click.stop="handleArtistClick(artists.id)"
>
{{ artists.name }}
</span>
<span>{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</div>
</div>

Expand Down
14 changes: 8 additions & 6 deletions src/renderer/components/player/MobilePlayBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
<h1 class="music-title">{{ playMusic.name }}</h1>
<div class="artist-info">
<span class="artist-name">
<span v-for="(artists, artistsindex) in artistList" :key="artistsindex">
{{ artists.name }}{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(artists, artistsindex) in artistList" :key="artistsindex">
<span>{{ artists.name }}</span>
<span>{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</span>
</div>
</div>
Expand Down Expand Up @@ -86,9 +87,10 @@
<span class="mini-song-title">{{ playMusic.name }}</span>
<span class="mx-2 text-gray-500 dark:text-gray-400">-</span>
<span class="mini-song-artist">
<span v-for="(artists, artistsindex) in artistList" :key="artistsindex">
{{ artists.name }}{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(artists, artistsindex) in artistList" :key="artistsindex">
<span>{{ artists.name }}</span>
<span>{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</span>
</n-ellipsis>
</div>
Expand Down
17 changes: 9 additions & 8 deletions src/renderer/components/player/PlayBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@
zIndex: 99999
}"
>
<span
v-for="(artists, artistsindex) in artistList"
:key="artistsindex"
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(artists.id)"
>
{{ artists.name }}{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}
</span>
<template v-for="(artists, artistsindex) in artistList" :key="artistsindex">
<span
class="cursor-pointer hover:text-green-500"
@click="handleArtistClick(artists.id)"
>
{{ artists.name }}
</span>
<span>{{ artistsindex < artistList.length - 1 ? ' / ' : '' }}</span>
</template>
</n-ellipsis>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/router/other.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const otherRouter = [
showInMenu: false,
back: true
},
component: () => import('@/views/artist/detail.vue')
component: () => import('@/views/artist/detail.vue'),
props: (route) => ({ key: route.params.id })
},
{
path: '/bilibili/:bvid',
Expand Down
6 changes: 1 addition & 5 deletions src/renderer/store/modules/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,11 +889,7 @@ export const usePlayerStore = defineStore('player', () => {
}

// 如果是当前正在播放的音乐,则切换播放/暂停状态
if (
playMusic.value.id === song.id &&
playMusic.value.playMusicUrl === song.playMusicUrl &&
!song.isFirstPlay
) {
if (playMusic.value.id === song.id && playMusic.value.playMusicUrl === song.playMusicUrl) {
if (play.value) {
setPlayMusic(false);
audioService.getCurrentSound()?.pause();
Expand Down