排行榜数据显示
This commit is contained in:
@@ -4,7 +4,7 @@ import Avatar from "@/components/Avatar.vue";
|
||||
import useStore from "@/store";
|
||||
import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { user, config } = storeToRefs(store);
|
||||
const { user, config, rankData } = storeToRefs(store);
|
||||
const props = defineProps({
|
||||
showRank: {
|
||||
type: Boolean,
|
||||
@@ -89,13 +89,18 @@ watch(
|
||||
src="../static/global-rank.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<text>本赛季</text>
|
||||
<text>暂未上榜</text>
|
||||
<!-- <text class="rank-number"
|
||||
>第<text :style="{ color: '#ffd700' }"
|
||||
>{{ user.points }}/{{ user.rankLvl }}</text
|
||||
>名</text
|
||||
> -->
|
||||
<block v-if="user.ranking > 0 && rankData.rank.length">
|
||||
<text>本赛季全国</text>
|
||||
<text class="rank-number"
|
||||
>第<text :style="{ color: '#ffd700' }"
|
||||
>{{ user.ranking }}/{{ rankData.rank.length }}</text
|
||||
>名</text
|
||||
>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text>本赛季</text>
|
||||
<text>暂未上榜</text>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
|
||||
Reference in New Issue
Block a user