This commit is contained in:
@@ -12,7 +12,7 @@ interface Props {
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'join'): void
|
||||
(e: "join"): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
@@ -40,12 +40,12 @@ function getProgressPercentage() {
|
||||
}
|
||||
|
||||
function handleJoin() {
|
||||
emit('join')
|
||||
emit("join")
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-card style="margin-bottom: 24px;">
|
||||
<n-card style="margin-bottom: 24px">
|
||||
<n-flex justify="space-between" align="center">
|
||||
<n-flex align="center">
|
||||
<n-tag type="warning" v-if="problemSet.status === 'archived'">
|
||||
|
||||
@@ -11,7 +11,7 @@ interface Props {
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'problem-click', problemId: string): void
|
||||
(e: "problem-click", problemId: string): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
@@ -20,7 +20,7 @@ const emit = defineEmits<Emits>()
|
||||
const { isDesktop } = useBreakpoints()
|
||||
|
||||
function handleProblemClick(problemId: string) {
|
||||
emit('problem-click', problemId)
|
||||
emit("problem-click", problemId)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -48,10 +48,14 @@ async function loadUserProgress() {
|
||||
// 监听分页参数变化
|
||||
watch([() => query.page, () => query.limit], loadUserProgress)
|
||||
// 监听班级过滤变化(防抖)
|
||||
watchDebounced(classFilter, () => {
|
||||
query.page = 1 // 重置到第一页
|
||||
loadUserProgress()
|
||||
}, { debounce: 500 })
|
||||
watchDebounced(
|
||||
classFilter,
|
||||
() => {
|
||||
query.page = 1 // 重置到第一页
|
||||
loadUserProgress()
|
||||
},
|
||||
{ debounce: 500 },
|
||||
)
|
||||
|
||||
// 使用后端返回的统计数据
|
||||
const stats = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user