mirror of
https://github.com/imsyy/SPlayer.git
synced 2026-04-25 06:55:57 +03:00
[PR #469] [MERGED] fix:修复歌词显示相关 #473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/imsyy/SPlayer/pull/469
Author: @Pissofdvpe
Created: 9/20/2025
Status: ✅ Merged
Merged: 9/23/2025
Merged by: @imsyy
Base:
dev← Head:dev-fix📝 Commits (4)
8bd3dc5Update MainLyric.vue105fed4Update LyricsSetting.vue6e1e56cUpdate lyric.html172ca5aUpdate lyric.html📊 Changes
3 files changed (+45 additions, -31 deletions)
View changed files
📝
src/components/Player/MainLyric.vue(+36 -22)📝
src/components/Setting/LyricsSetting.vue(+8 -8)📝
web/lyric.html(+1 -1)📄 Description
概述
变更涉及
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)。🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.