fix: 位次差计算
parent
a3d913dadd
commit
9a622dd6e3
3509
pnpm-lock.yaml
3509
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -81,7 +81,8 @@
|
|||
]);
|
||||
|
||||
const rankDiff = (index: number, item: any) => {
|
||||
return index === props.data.length - 1 ? item["rankLine"] !== '--' && props.data[index + 1]["rankLine"] !== '--' ? item["rankLine"] - props.data[index + 1]["rankLine"] : '--' : '--';
|
||||
if(typeof props.data[index + 1] === 'undefined') return '--';
|
||||
return index === props.data.length - 1 ? item["rankLine"] !== '--' ? item["rankLine"] - props.data[index + 1]["rankLine"] : '--' : '--';
|
||||
};
|
||||
|
||||
const recompileData = computed(() => {
|
||||
|
|
@ -91,7 +92,9 @@
|
|||
props.lowscoreRank !== -1
|
||||
? props.lowscoreRank === 0
|
||||
? '--'
|
||||
: item['rankLine'] - props.lowscoreRank
|
||||
: item['rankLine'] != '--'
|
||||
? item['rankLine'] - props.lowscoreRank
|
||||
: '--'
|
||||
: rankDiff(index, item)
|
||||
item['lineDiff'] = item['score'] !== '--' ? item['score'] - props.score : '--'
|
||||
return item
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ export default defineConfig({
|
|||
},
|
||||
server: {
|
||||
host: "localhost",
|
||||
port: 3001,
|
||||
proxy:{
|
||||
'/api':{
|
||||
target:'http://192.168.31.149:5006',
|
||||
|
|
|
|||
Loading…
Reference in New Issue