歌单列表添加歌单内歌曲数量显示

pull/930/merge
lyswhut 2022-07-08 16:39:56 +08:00
parent 23b8c325f4
commit ff9efbd4ea
8 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,7 @@
### 优化
- 歌单列表添加歌单内歌曲数量显示目前只有kw、mg、wy、tx部分源支持显示
### 修复 ### 修复
- 修复处于不支持的源时,歌单、排行榜的右键下载菜单没有禁用的问题 - 修复处于不支持的源时,歌单、排行榜的右键下载菜单没有禁用的问题

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12,1C7,1 3,5 3,10V17A3,3 0 0,0 6,20H9V12H5V10A7,7 0 0,1 12,3A7,7 0 0,1 19,10V12H15V20H18A3,3 0 0,0 21,17V10C21,5 16.97,1 12,1Z" /></svg>

After

Width:  |  Height:  |  Size: 422 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z" /></svg>

After

Width:  |  Height:  |  Size: 515 B

View File

@ -137,6 +137,7 @@ export default {
author: item.uname, author: item.uname,
name: item.name, name: item.name,
// time: item.publish_time, // time: item.publish_time,
total: item.total,
img: item.img, img: item.img,
grade: item.favorcnt / 10, grade: item.favorcnt / 10,
desc: item.desc, desc: item.desc,
@ -153,6 +154,7 @@ export default {
id: `digest-${item.digest}__${item.id}`, id: `digest-${item.digest}__${item.id}`,
author: item.uname, author: item.uname,
name: item.name, name: item.name,
total: item.total,
// time: item.publish_time, // time: item.publish_time,
img: item.img, img: item.img,
grade: item.favorcnt && item.favorcnt / 10, grade: item.favorcnt && item.favorcnt / 10,

View File

@ -284,6 +284,7 @@ export default {
// }) // })
}, },
filterList(rawData) { filterList(rawData) {
// console.log(rawData)
return rawData.map(item => ({ return rawData.map(item => ({
play_count: this.formatPlayCount(item.playCount), play_count: this.formatPlayCount(item.playCount),
id: item.playListId, id: item.playListId,
@ -292,6 +293,7 @@ export default {
time: item.createTime, time: item.createTime,
img: item.image, img: item.image,
grade: item.grade, grade: item.grade,
total: item.contentCount,
desc: item.summary, desc: item.summary,
source: 'mg', source: 'mg',
})) }))

View File

@ -142,6 +142,7 @@ export default {
// time: item.publish_time, // time: item.publish_time,
img: item.cover_url_medium, img: item.cover_url_medium,
// grade: item.favorcnt / 10, // grade: item.favorcnt / 10,
total: item.song_ids?.length,
desc: item.desc, desc: item.desc,
source: 'tx', source: 'tx',
})), })),

View File

@ -218,6 +218,7 @@ export default {
}) })
}, },
filterList(rawData) { filterList(rawData) {
// console.log(rawData)
return rawData.map(item => ({ return rawData.map(item => ({
play_count: this.formatPlayCount(item.playCount), play_count: this.formatPlayCount(item.playCount),
id: item.id, id: item.id,
@ -226,6 +227,7 @@ export default {
time: item.createTime, time: item.createTime,
img: item.coverImgUrl, img: item.coverImgUrl,
grade: item.grade, grade: item.grade,
total: item.trackCount,
desc: item.description, desc: item.description,
source: 'wy', source: 'wy',
})) }))

View File

@ -33,7 +33,13 @@ div(:class="$style.container")
//- img(:src="item.img") //- img(:src="item.img")
div(:class="$style.right" :src="item.img") div(:class="$style.right" :src="item.img")
h4 {{item.name}} h4 {{item.name}}
p(:class="$style.play_count") {{item.play_count}} div(:class="$style.songlist_info")
span(v-if="item.total != null")
svg-icon(name="music")
| {{item.total}}
span
svg-icon(name="headphones")
| {{item.play_count}}
p(:class="$style.author") {{item.author}} p(:class="$style.author") {{item.author}}
li(:class="$style.item" style="cursor: default;" v-for="i in spaceNum") li(:class="$style.item" style="cursor: default;" v-for="i in spaceNum")
div(:class="$style.pagination") div(:class="$style.pagination")
@ -529,7 +535,10 @@ export default {
.mixin-ellipsis-2; .mixin-ellipsis-2;
} }
} }
.play_count { .songlist_info {
display: flex;
flex-flow: row nowrap;
gap: 15px;
margin-top: 12px; margin-top: 12px;
font-size: 12px; font-size: 12px;
.mixin-ellipsis-1; .mixin-ellipsis-1;
@ -537,6 +546,9 @@ export default {
line-height: 1.2; line-height: 1.2;
// text-indent: 24px; // text-indent: 24px;
color: @color-theme_2-font-label; color: @color-theme_2-font-label;
svg {
margin-right: 2px;
}
} }
.author { .author {
margin-top: 6px; margin-top: 6px;