diff --git a/publish/changeLog.md b/publish/changeLog.md index 33529d36..97f8665d 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -6,6 +6,7 @@ ### 优化 - 允许播放除了搜索列表以外的所有歌曲,即原来没有播放按钮或者灰色的歌曲都可以去尝试点击播放。注:该功能的原理是尝试自动切换到其他源播放,所以不一定会播放成功,特别是对于那些独家的资源 +- 优化单首歌曲的“添加到列表”弹窗歌曲列表状态的显示;现在在收藏单首歌曲时,若列表存在本歌曲则列表名字将变成灰色不可点击状态。总的来说,在添加单首歌曲时若列表名是灰色,则证明当前歌曲已在那个列表中 ### 移除 @@ -18,3 +19,4 @@ - 修复歌单列表加载失败时无法进入歌单打开界面的问题 - 修复mg源歌单列表无法加载的问题 - 修复kg跳转到官方歌曲详情页的歌曲无法播放的问题 +- 修复我的列表的歌曲添加到其他列表时不排除当前列表的问题 diff --git a/src/renderer/components/material/ListAddModal.vue b/src/renderer/components/material/ListAddModal.vue index c42c8de3..dca5e789 100644 --- a/src/renderer/components/material/ListAddModal.vue +++ b/src/renderer/components/material/ListAddModal.vue @@ -6,7 +6,7 @@ material-modal(:show="show" :bg-close="bgClose" @close="handleClose") span(:class="$style.name") {{this.musicInfo && `${musicInfo.name}`}} |  {{$t('material.list_add_modal.title_last')}} div.scroll(:class="$style.btnContent") - material-btn(:class="$style.btn" :tips="$t('material.list_add_modal.btn_title', { name: item.name })" :key="item.id" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}} + material-btn(:class="$style.btn" :tips="$t('material.list_add_modal.btn_title', { name: item.name })" :key="item.id" :disabled="item.isExist" @click="handleClick(index)" v-for="(item, index) in lists") {{item.name}} material-btn(:class="[$style.btn, $style.newList, isEditing ? $style.editing : null]" @click="handleEditing($event)" :tips="$t('view.list.lists_new_list_btn')") svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' viewBox='0 0 42 42' space='preserve') use(xlink:href='#icon-addTo') @@ -57,11 +57,12 @@ export default { computed: { ...mapGetters('list', ['defaultList', 'loveList', 'userList']), lists() { + if (!this.musicInfo) return [] return [ this.defaultList, this.loveList, ...this.userList, - ].filter(l => l.id != this.excludeListId.includes(l.id)) + ].filter(l => !this.excludeListId.includes(l.id)).map(l => ({ ...l, isExist: l.list.some(s => s.songmid == this.musicInfo.songmid) })) }, spaceNum() { return this.lists.length < 2 ? 0 : (3 - this.lists.length % 3 - 1) diff --git a/src/renderer/components/material/ListAddMultipleModal.vue b/src/renderer/components/material/ListAddMultipleModal.vue index 40a9e734..cee9a6c0 100644 --- a/src/renderer/components/material/ListAddMultipleModal.vue +++ b/src/renderer/components/material/ListAddMultipleModal.vue @@ -62,7 +62,7 @@ export default { this.defaultList, this.loveList, ...this.userList, - ].filter(l => l.id != this.excludeListId.includes(l.id)) + ].filter(l => !this.excludeListId.includes(l.id)) }, spaceNum() { return this.lists.length < 2 ? 0 : (3 - this.lists.length % 3 - 1)