Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

style(SongWiki): 修复了一些样式问题 - #1002

Merged
imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/wiki-style
Mar 16, 2026
Merged

imsyy merged 1 commit into
SPlayer-Dev:devfrom
MoYingJi:pr/wiki-style

Conversation

@MoYingJi

Copy link
Copy Markdown
Collaborator
  1. 当歌曲封面不是正方形时,封面背板(cover-shadow)显示错误
  2. 为点击查看封面预览也设置了圆角,与 ListDetail 保持一致

Copilot AI review requested due to automatic review settings March 15, 2026 18:02
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求主要关注于优化歌曲维基页面中封面图片的显示样式。通过调整图片组件的属性和相关CSS,解决了非正方形封面导致背板显示异常的问题,并统一了封面预览图的圆角样式,以提供更美观和一致的用户界面。

Highlights

  • 修复封面背板显示问题: 解决了当歌曲封面不是正方形时,封面背板(cover-shadow)显示不正确的问题,确保视觉效果一致。
  • 统一封面预览圆角样式: 为点击查看的封面预览图设置了圆角样式,使其与 ListDetail 组件的视觉风格保持一致,提升用户体验。
Changelog
  • src/views/Song/wiki.vue
    • 修复了当歌曲封面不是正方形时,封面背板显示不正确的问题。
    • 为点击查看的封面预览图设置了圆角样式,使其与 ListDetail 保持一致。
    • 调整了 .cover-container 内部图片的宽度和高度,以确保正确填充。
Activity
  • 此拉取请求自创建以来没有人工活动。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

本次 PR 主要修复了歌曲百科页面的一些样式问题,包括非正方形封面导致的背板显示错误,以及为封面预览添加了圆角,与 ListDetail 保持一致。

代码变更通过添加 object-fit: cover 属性和统一的 :deep(img) 样式,有效地解决了布局问题,并将样式逻辑从模板中移至样式块,提高了代码的可维护性。

不过,在重构过程中,n-image 组件的 alt 属性被意外移除了,这会影响到屏幕阅读器用户的可访问性。我已在具体的代码行提出了建议,希望能恢复并优化 alt 属性,为主封面图提供更具描述性的文本,并为装饰性图片设置为空的 alt 属性。

Comment thread src/views/Song/wiki.vue
class="cover-img"
object-fit="cover"
:previewed-img-props="{ style: { borderRadius: '8px' } }"
:render-toolbar="renderToolbar"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

为了可访问性(accessibility),建议为封面图片添加 alt 属性。这对于屏幕阅读器用户至关重要。使用动态的歌曲名称作为 alt 文本会比之前硬编码的 'detail-cover' 更具描述性,同时也修复了此次变更中意外移除 alt 属性的问题。

              :render-toolbar="renderToolbar"
              :img-props="{ alt: currentSong.name }"

Comment thread src/views/Song/wiki.vue
preview-disabled
:src="currentSong.cover"
:img-props="{ alt: 'cover-shadow' }"
object-fit="cover"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

这个封面阴影是装饰性图片,建议为其添加一个空的 alt 属性 (alt="")。这有助于屏幕阅读器等辅助技术正确地忽略它,从而改善可访问性。此次变更移除了 alt 属性,建议将其加回。

              object-fit="cover"
              :img-props="{ alt: '' }"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 聚焦于 SongWiki 页面封面展示样式:修复非正方形封面时背板(cover-shadow)显示异常,并让封面预览的圆角与 ListDetail 保持一致。

Changes:

  • 为歌曲封面预览图增加圆角样式(与 ListDetail 对齐)
  • 调整封面背板渲染方式以适配非正方形封面
  • 在封面容器内补充 img 的宽高约束以避免尺寸异常

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/views/Song/wiki.vue
1. 当歌曲封面不是正方形时,封面背板(`cover-shadow`)显示错误
2. 为点击查看封面预览也设置了圆角,与 `ListDetail` 保持一致
@imsyy
imsyy merged commit 64ecbea into SPlayer-Dev:dev Mar 16, 2026
@MoYingJi
MoYingJi deleted the pr/wiki-style branch March 16, 2026 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants