fix: 分数线的计算修改

master
DavidMorgan 2026-04-13 13:58:20 +08:00
parent cb3e3b01ff
commit 20b585a5c9
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
23.8.0 25.7.0

View File

@ -81,7 +81,7 @@
]); ]);
const rankDiff = (index: number, item: any) => { const rankDiff = (index: number, item: any) => {
return index === props.data.length - 1 ? item["rankLine"] : item["rankLine"] - props.data[index + 1]["rankLine"]; return index === props.data.length - 1 ? item["rankLine"] !== '--' ? item["rankLine"] - props.data[index + 1]["rankLine"] : '--' : '--';
}; };
const recompileData = computed(() => { const recompileData = computed(() => {
@ -93,7 +93,7 @@
? '--' ? '--'
: item['rankLine'] - props.lowscoreRank : item['rankLine'] - props.lowscoreRank
: rankDiff(index, item) : rankDiff(index, item)
item['lineDiff'] = item['score'] - props.score item['lineDiff'] = item['score'] !== '--' ? item['score'] - props.score : '--'
return item return item
}) })
return _data; return _data;