|
|
@@ -156,7 +156,7 @@ export function scoreItemsText(items: ScoreItem[]): string {
|
|
|
return visible.slice(0, 3).map((item) => `${displayScoreLabel(item.label)} ${item.scoreLabel}`).join(" · ");
|
|
|
}
|
|
|
|
|
|
-export function compactScoreItemsText(items: ScoreItem[]): string {
|
|
|
+export function compactScoreItemsList(items: ScoreItem[]): string[] {
|
|
|
// 总分 + 各加权维度(group=main:相关性/平台/抖音的适老性),不再截断到 3 项。
|
|
|
const wanted = items.filter(
|
|
|
(item) =>
|
|
|
@@ -164,8 +164,12 @@ export function compactScoreItemsText(items: ScoreItem[]): string {
|
|
|
item.scoreLabel !== "暂无评分" &&
|
|
|
(displayScoreLabel(item.label) === "总分" || item.group === "main")
|
|
|
);
|
|
|
- if (!wanted.length) return "暂无评分";
|
|
|
- return wanted.map((item) => `${compactScoreLabel(item.label)} ${item.scoreLabel.replace(/\s*分$/, "")}`).join(" · ");
|
|
|
+ return wanted.map((item) => `${compactScoreLabel(item.label)} ${item.scoreLabel.replace(/\s*分$/, "")}`);
|
|
|
+}
|
|
|
+
|
|
|
+export function compactScoreItemsText(items: ScoreItem[]): string {
|
|
|
+ const list = compactScoreItemsList(items);
|
|
|
+ return list.length ? list.join(" · ") : "暂无评分";
|
|
|
}
|
|
|
|
|
|
export function scoreItemRows(items: ScoreItem[]): ScoreItem[] {
|