接入练习数据接口

This commit is contained in:
kron
2025-05-31 15:03:14 +08:00
parent 2a2dddfc11
commit ca182daaae
3 changed files with 43 additions and 11 deletions

View File

@@ -1,7 +1,9 @@
<script setup>
import Container from "@/components/Container.vue";
const grade = 7;
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
</script>
<template>
@@ -13,12 +15,12 @@ const grade = 7;
<view
:style="{
backgroundColor:
index + 1 < grade
index + 1 < user.lvl
? '#fff9'
: index + 1 === grade
: index + 1 === user.lvl
? '#fed847'
: 'transparent',
borderColor: index + 1 === grade ? '#fed847' : '#fff9',
borderColor: index + 1 === user.lvl ? '#fed847' : '#fff9',
}"
/>
<view />