修复排位积分值不显示的问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, computed, watch } from "vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
@@ -29,16 +29,24 @@ const toUserPage = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
watch(
|
||||||
const rankInfos = config.value.randInfos || [];
|
() => [config.value, user.value],
|
||||||
|
([n_config, n_user]) => {
|
||||||
|
const rankInfos = n_config.randInfos || [];
|
||||||
|
if (n_user.id && rankInfos.length) {
|
||||||
rankInfos.some((r, index) => {
|
rankInfos.some((r, index) => {
|
||||||
if (r.upgrade_scores > user.value.scores) {
|
if (r.upgrade_scores > n_user.scores) {
|
||||||
nextLvlPoints.value = r.upgrade_scores;
|
nextLvlPoints.value = r.upgrade_scores;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user