OAFRONT6 补齐次级长编号压缩

这个提交包含在:
2026-05-25 20:23:40 +08:00
父节点 971d5311e3
当前提交 47287a45d2
共修改 4 个文件,包含 37 行新增和 12 行删除
+4 -3
查看文件
@@ -58,7 +58,8 @@ export function formatTextWithCompactLongNumbers(value: string | number | null |
const text = String(value ?? "").trim();
if (!text) return "-";
return text.replace(/\b20[0-9]{12,}\b/g, (match) =>
formatCompactIdentifier(match, { head: 10, tail: 4, minLength: 14 }),
);
return text.replace(/\b20[0-9]{12,}\b/g, (match) => {
if (match.length <= 12) return match;
return `${match.slice(0, 8)}…${match.slice(-4)}`;
});
}