🐞 fix: 修正无歌词时条件

This commit is contained in:
imsyy
2025-11-18 18:19:38 +08:00
parent ea822f91e8
commit ffb1fcc1ea
2 changed files with 12 additions and 3 deletions

View File

@@ -30,8 +30,8 @@
:class="[
'player-content',
{
'no-lrc': noLrc,
pure: statusStore.pureLyricMode && musicStore.isHasLrc,
'no-lrc': !musicStore.isHasLrc || (!musicStore.isHasLrc && !statusStore.lyricLoading),
},
]"
@mousemove="playerMove"
@@ -96,6 +96,15 @@ const isShowComment = computed<boolean>(
() => !musicStore.playSong.path && statusStore.showPlayerComment,
);
/** 没有歌词 */
const noLrc = computed<boolean>(() => {
const noNormalLrc = !musicStore.isHasLrc;
const noYrcAvailable = !musicStore.isHasYrc || !settingStore.showYrc;
const notLoading = !statusStore.lyricLoading;
return noNormalLrc && noYrcAvailable && notLoading;
});
// 主内容 key
const playerContentKey = computed(() => `${statusStore.pureLyricMode}`);

View File

@@ -1,10 +1,10 @@
<template>
<div class="setting">
<div class="set-left">
<div class="title">
<n-flex class="title" :size="0" vertical>
<n-h1>设置</n-h1>
<n-text :depth="3">个性化与全局设置</n-text>
</div>
</n-flex>
<!-- 设置菜单 -->
<n-menu
v-model:value="activeKey"