fix(tracklist): TrackListItem 序号问题 (#2011)

直接使用 track.no 可能导致歌曲编号重复。改使用曲目在
阵列中的实际索引位置。
This commit is contained in:
Younglina 2023-04-08 23:12:13 +08:00 committed by GitHub
parent 7b97ac0139
commit 8a50337854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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)"

View File

@ -21,7 +21,7 @@
style="height: 14px; width: 14px"
></svg-icon>
</button>
<span v-show="(!focus || !playable) && !isPlaying">{{ track.no }}</span>
<span v-show="(!focus || !playable) && !isPlaying">{{ trackNo }}</span>
<button v-show="isPlaying">
<svg-icon
icon-class="volume"
@ -96,6 +96,7 @@ export default {
props: {
trackProp: Object,
trackNo: Number,
highlightPlayingTrack: {
type: Boolean,
default: true,

View File

@ -96,9 +96,7 @@
{{ $t('album.released') }}
{{ album.publishTime | formatDate('MMMM D, YYYY') }}
</div>
<div v-if="album.company" class="copyright">
© {{ album.company }}
</div>
<div v-if="album.company" class="copyright"> © {{ album.company }} </div>
</div>
<div v-if="filteredMoreAlbums.length !== 0" class="more-by">
<div class="section-title">