优化首屏
This commit is contained in:
@@ -197,7 +197,11 @@ defineExpose({
|
||||
{{ SYNC_MESSAGES.SYNCING_WITH(syncStatus.otherUser.value.name) }}
|
||||
</n-tag>
|
||||
<n-tag
|
||||
v-if="userStore.isSuperAdmin && !syncStatus.otherUser.value && syncStatus.hadConnection.value"
|
||||
v-if="
|
||||
userStore.isSuperAdmin &&
|
||||
!syncStatus.otherUser.value &&
|
||||
syncStatus.hadConnection.value
|
||||
"
|
||||
type="warning"
|
||||
>
|
||||
{{ SYNC_MESSAGES.STUDENT_LEFT }}
|
||||
|
||||
@@ -4,9 +4,19 @@ import { problem } from "oj/composables/problem"
|
||||
import { DIFFICULTY, JUDGE_STATUS } from "utils/constants"
|
||||
import { getACRateNumber, getTagColor, parseTime } from "utils/functions"
|
||||
import { Pie } from "vue-chartjs"
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
ArcElement,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend,
|
||||
Colors,
|
||||
} from "chart.js"
|
||||
import { getProblemBeatRate } from "oj/api"
|
||||
import { isDesktop } from "shared/composables/breakpoints"
|
||||
import { registerChart } from "utils/registerChart"
|
||||
|
||||
// 仅注册饼图所需的 Chart.js 组件
|
||||
ChartJS.register(ArcElement, Title, Tooltip, Legend, Colors)
|
||||
|
||||
const beatRate = ref("0")
|
||||
|
||||
@@ -74,7 +84,6 @@ async function getBeatRate() {
|
||||
beatRate.value = res.data
|
||||
}
|
||||
|
||||
onBeforeMount(registerChart)
|
||||
onMounted(getBeatRate)
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user