This repository was archived by the owner on Jul 17, 2026. It is now read-only.
fix:修复歌词显示相关 - #469
Merged
Merged
fix:修复歌词显示相关#469
Conversation
fix:修复播放页面歌词设置在居中和居右状态下不能自动换行
feat:优化调整歌词大小设置
feat:优化桌面歌词字体调整
feat:优化调整桌面歌词字体大小设置
Pissofdvpe
marked this pull request as draft
September 21, 2025 14:40
Pissofdvpe
marked this pull request as ready for review
September 21, 2025 14:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
变更涉及
src/components/Player/MainLyric.vue
src/components/Setting/LyricsSetting.vue
web/lyric.html
修改内容
1. 歌词组件更新 (
src/components/Player/MainLyric.vue).content和.count-down-content .content设置overflow-wrap: anywhere; word-break: break-word; white-space: normal; hyphens: auto;,确保长歌词自动换行,避免溢出。width: 100%;和box-sizing: border-box;到.lrc-line和.content,优化宽度控制。clamp(14px, 2vw, 18px)动态调整歌词字体大小,适配不同屏幕。lang属性:通过正则/[\u4e00-\u9fa5]/检测中文(lang="zh-CN")或英文(lang="en"),应用于<span class="content">。lang属性:动态检测中文或英文,应用于<span class="word">和<span class="filler">。translateY垂直微调逻辑(包括translateY(-${Math.min(((playSeek.value - wordData.time) / wordData.duration) * 2, 2)}px)和默认translateY(-2px)),简化动画。lang="en"到<span class="tran">和<span class="roma">。overflow-wrap: anywhere; word-break: break-word; white-space: normal; hyphens: auto;。.lrc-line的align-items: flex-end;和align-items: center !important;,改进布局对齐。:deep(.n-scrollbar-content)的max-width: 100%; box-sizing: border-box;。2. 歌词设置组件更新 (
src/components/Setting/LyricsSetting.vue)lyricFontSize)、翻译歌词大小(tranFontSize)、音译歌词大小(romaFontSize)的最小值以适配不同设备使用体验。<n-select>的选项生成逻辑,调整label和value的起始值从20 + i改为10 + i。label: "${20 + i} px", value: 20 + ilabel: "${10 + i} px", value: 10 + i3. Web 歌词页面更新 (
web/lyric.html)fontSize > 10为配合LyricsSetting.vue中的桌面歌词文字大小设置(最小值 10px)。