fix: 分数线的计算修改
parent
cb3e3b01ff
commit
20b585a5c9
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue