feat(matrix): 悬停里的每条视频显示自己的赞/评/藏/转
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s

一格合并了多条时,并集只能说明「这天整体怎么样」,哪条是爆款要看每条自己的
数字。后端在 details 里带上各自的最近一轮指标,提示里缩进显示在该条标题下面。
This commit is contained in:
2026-10-25 07:49:09 +08:00
parent 6513e5d4e8
commit 809692a957
3 changed files with 57 additions and 11 deletions
+26 -4
View File
@@ -236,9 +236,16 @@
border-top: 1px solid var(--line);
white-space: normal;
}
#tip .tip-notes div { line-height: 1.55; }
#tip .tip-note { margin-bottom: 4px; line-height: 1.55; }
#tip .tip-note-title { color: var(--text); }
#tip .tip-note-tags { color: var(--pink); margin-left: 6px; }
/* 每条作品自己的指标。缩进到标题文字下面,一眼对得上是哪条。 */
#tip .tip-note-meta {
padding-left: 14px;
color: var(--muted);
font-variant-numeric: tabular-nums;
}
#tip .tip-note-metrics { margin-right: 8px; }
#tip .tip-note-tags { color: var(--pink); }
#tip .tip-note-more { color: var(--muted); }
</style>
</head>
@@ -415,15 +422,30 @@
for (let index = 0; index < Math.min(details.length, limit); index += 1) {
const item = details[index];
const row = document.createElement('div');
const title = document.createElement('span');
row.className = 'tip-note';
const title = document.createElement('div');
title.className = 'tip-note-title';
title.textContent = index + 1 + '. ' + item.title;
row.appendChild(title);
const meta = document.createElement('div');
meta.className = 'tip-note-meta';
const metrics = document.createElement('span');
metrics.className = 'tip-note-metrics';
metrics.textContent =
'赞 ' + compact(item.likes) +
' · 评 ' + compact(item.comments) +
' · 藏 ' + compact(item.collected) +
' · 转 ' + compact(item.shares);
meta.appendChild(metrics);
const noteTags = document.createElement('span');
noteTags.className = 'tip-note-tags';
noteTags.textContent =
item.tags && item.tags.length ? item.tags.join(' / ') : '无标签';
row.appendChild(noteTags);
meta.appendChild(noteTags);
row.appendChild(meta);
list.appendChild(row);
}
if (details.length > limit) {