聚合搜索歌单添加源名称显示

pull/1053/head
lyswhut 2022-11-17 18:06:14 +08:00
parent 3b5832eceb
commit ec2b802912
3 changed files with 13 additions and 6 deletions

View File

@ -22,6 +22,7 @@ import {
defineComponent,
shallowReactive,
defineExpose,
withDefaults,
} from 'vue'
// import { useStore } from 'vuex'
@ -82,4 +83,5 @@ export {
defineComponent,
shallowReactive,
defineExpose,
withDefaults,
}

View File

@ -1,6 +1,6 @@
<template>
<div class="scroll" :class="$style.container">
<SongList ref="listRef" :list-info="listInfo" @toggle-page="togglePage" />
<div :class="$style.container">
<SongList ref="listRef" :list-info="listInfo" :visible-source="sourceId == 'all'" @toggle-page="togglePage" />
</div>
</template>
@ -61,6 +61,7 @@ const togglePage = (page: number) => {
top: 0;
width: 100%;
height: 100%;
padding-top: 5px;
}
// .list {

View File

@ -9,11 +9,12 @@
<div :class="$style.desc">
<h4>{{ item.name }}</h4>
<div>
<p :class="$style.author">{{ item.author }}</p>
<div :class="$style.songlist_info">
<span v-if="item.total != null"><svg-icon name="music" />{{ item.total }}</span>
<span v-if="item.play_count != null"><svg-icon name="headphones" />{{ item.play_count }}</span>
<span v-if="visibleSource">{{ item.source }}</span>
</div>
<p :class="$style.author">{{ item.author }}</p>
</div>
</div>
</li>
@ -38,9 +39,12 @@ import { ListInfo, ListInfoItem } from '@renderer/store/songList/state'
import { useRoute, useRouter } from '@common/utils/vueRouter'
const props = defineProps<{
const props = withDefaults(defineProps<{
listInfo: ListInfo
}>()
visibleSource: boolean
}>(), {
visibleSource: false,
})
const router = useRouter()
const route = useRoute()
@ -175,7 +179,7 @@ defineExpose({
font-size: 12px;
.mixin-ellipsis-1;
text-align: justify;
line-height: 1.2;
line-height: 1.3;
// text-indent: 24px;
color: var(--color-font-label);
}