Skip to content

feat(PlayerControl): 增加了显示完整评论数量的 title 属性#1026

Open
MoYingJi wants to merge 1 commit intoimsyy:devfrom
MoYingJi:pr/show-full-comment-count-tooltip
Open

feat(PlayerControl): 增加了显示完整评论数量的 title 属性#1026
MoYingJi wants to merge 1 commit intoimsyy:devfrom
MoYingJi:pr/show-full-comment-count-tooltip

Conversation

@MoYingJi
Copy link
Copy Markdown
Collaborator

@MoYingJi MoYingJi commented Apr 3, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 3, 2026 12:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

该 PR 旨在为全屏播放器的评论数量徽标增加一个 title 提示,用于在徽标显示为缩写格式时(如 1.2w)仍可悬停查看完整评论数。

Changes:

  • 将评论数量徽标的展示从 :value 改为使用 #value 插槽自定义渲染,并在数值元素上增加 title(完整数字字符串)。
  • 为评论徽标增加专用样式类,并调整 Naive UI 徽标伪元素的显示以适配新的渲染方式。

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

This pull request updates the comment count badge in the player controls to use a template slot, enabling a tooltip for the full count, and adds associated styling. Feedback suggests using toLocaleString() in the title attribute to improve the readability of large numbers.

"
>
<template #value>
<span :title="statusStore.songCommentCount.toString()">
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

为了提高可读性,特别是对于较大的数字,建议使用 toLocaleString() 方法来格式化 title 属性中的完整评论数。这会自动根据用户的区域设置添加千位分隔符(例如,将 1000000 显示为 1,000,000),使用户更容易快速理解数字的大小。

              <span :title="statusStore.songCommentCount.toLocaleString()">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants