This commit is contained in:
张成
2025-11-15 23:51:38 +08:00
parent 6519cb8eec
commit 4b5c677856
14 changed files with 78 additions and 32 deletions

View File

@@ -41,8 +41,12 @@ export function insertDotInTags(tags: string[]) {
return tags.join("-·-").split("-");
}
function formatNtrpDisplay(val) {
return Number(val).toFixed(1)
// 格式化NTRP水平显示统一保留一位小数
export function formatNtrpDisplay(val) {
if (!val || val === "0" || val === 0) return val;
const num = Number(val);
if (isNaN(num)) return val;
return num.toFixed(1);
}
export function genNTRPRequirementText(min, max) {