This commit is contained in:
2025-10-05 10:04:36 +08:00
parent ece84e15c7
commit 94d2066a99
9 changed files with 341 additions and 331 deletions

View File

@@ -75,7 +75,12 @@ const columns: DataTableColumn<User>[] = [
? parseTime(row.last_login, "YYYY-MM-DD HH:mm:ss") ? parseTime(row.last_login, "YYYY-MM-DD HH:mm:ss")
: "从未登录", : "从未登录",
}, },
{ title: "真名", key: "real_name", width: 100, render: (row) => h(TextCopy, () => row.real_name) }, {
title: "真名",
key: "real_name",
width: 100,
render: (row) => h(TextCopy, () => row.real_name),
},
{ title: "邮箱", key: "email", width: 200 }, { title: "邮箱", key: "email", width: 200 },
{ {
key: "actions", key: "actions",

View File

@@ -43,10 +43,7 @@ const changeLanguage = (v: LANGUAGE) => {
<template> <template>
<n-flex vertical> <n-flex vertical>
<Form <Form :storage-key="storageKey" @change-language="changeLanguage" />
:storage-key="storageKey"
@change-language="changeLanguage"
/>
<CodeEditor <CodeEditor
v-model:value="code.value" v-model:value="code.value"
:language="code.language" :language="code.language"

View File

@@ -158,7 +158,8 @@ watch(query, listSubmissions)
<template #header> <template #header>
<n-flex align="center"> <n-flex align="center">
<span> <span>
本道题你还没有解决你们班共有 <b>{{ class_ac_count }}</b> 人答案正确 本道题你还没有解决你们班共有
<b>{{ class_ac_count }}</b> 人答案正确
</span> </span>
<n-button <n-button
v-if="userStore.showSubmissions" v-if="userStore.showSubmissions"
@@ -245,7 +246,12 @@ watch(query, listSubmissions)
</template> </template>
<template v-if="userStore.showSubmissions && userStore.isAuthed"> <template v-if="userStore.showSubmissions && userStore.isAuthed">
<n-data-table v-if="submissions.length > 0" striped :columns="columns" :data="submissions" /> <n-data-table
v-if="submissions.length > 0"
striped
:columns="columns"
:data="submissions"
/>
<Pagination <Pagination
:total="total" :total="total"
v-model:limit="query.limit" v-model:limit="query.limit"

View File

@@ -9,8 +9,12 @@ import {
} from "~/shared/composables/switchScreen" } from "~/shared/composables/switchScreen"
import { problem } from "../composables/problem" import { problem } from "../composables/problem"
const ProblemEditor = defineAsyncComponent(() => import("./components/ProblemEditor.vue")) const ProblemEditor = defineAsyncComponent(
const ContestEditor = defineAsyncComponent(() => import("./components/ContestEditor.vue")) () => import("./components/ProblemEditor.vue"),
)
const ContestEditor = defineAsyncComponent(
() => import("./components/ContestEditor.vue"),
)
const EditorWithTest = defineAsyncComponent( const EditorWithTest = defineAsyncComponent(
() => import("./components/EditorWithTest.vue"), () => import("./components/EditorWithTest.vue"),
) )

View File

@@ -175,9 +175,7 @@ export function useCodeSync() {
roomUsers, roomUsers,
canSync: false, canSync: false,
message: message:
roomUsers === 1 roomUsers === 1 ? "正在等待小伙伴加入..." : "等待超级管理员加入...",
? "正在等待小伙伴加入..."
: "等待超级管理员加入...",
otherUser, otherUser,
}, },
onStatusChange, onStatusChange,