From 8a50337854a91914a8e4a81e9be181a7678b20fa Mon Sep 17 00:00:00 2001 From: Younglina Date: Sat, 8 Apr 2023 23:12:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(tracklist):=20TrackListItem=20=E5=BA=8F?= =?UTF-8?q?=E5=8F=B7=E9=97=AE=E9=A2=98=20(#2011)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 直接使用 track.no 可能导致歌曲编号重复。改使用曲目在 阵列中的实际索引位置。 --- src/components/TrackList.vue | 1 + src/components/TrackListItem.vue | 3 ++- src/views/album.vue | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/TrackList.vue b/src/components/TrackList.vue index 6743f3f..ebb5046 100644 --- a/src/components/TrackList.vue +++ b/src/components/TrackList.vue @@ -65,6 +65,7 @@ v-for="(track, index) in tracks" :key="itemKey === 'id' ? track.id : `${track.id}${index}`" :track-prop="track" + :track-no="index + 1" :highlight-playing-track="highlightPlayingTrack" @dblclick.native="playThisList(track.id || track.songId)" @click.right.native="openMenu($event, track, index)" diff --git a/src/components/TrackListItem.vue b/src/components/TrackListItem.vue index 907e884..3eef677 100644 --- a/src/components/TrackListItem.vue +++ b/src/components/TrackListItem.vue @@ -21,7 +21,7 @@ style="height: 14px; width: 14px" > - {{ track.no }} + {{ trackNo }}