problem submission tab,
This commit is contained in:
@@ -65,16 +65,6 @@ onMounted(init)
|
||||
</n-space>
|
||||
</n-alert>
|
||||
<n-card embedded>
|
||||
<n-space justify="end">
|
||||
<n-button
|
||||
quaternary
|
||||
class="copyBtn"
|
||||
type="primary"
|
||||
@click="handleCopy(submission!.code)"
|
||||
>
|
||||
{{ copied ? "已复制" : "复制代码" }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
<n-code
|
||||
class="code"
|
||||
:language="LANGUAGE_FORMAT_VALUE[submission.language]"
|
||||
@@ -82,6 +72,9 @@ onMounted(init)
|
||||
show-line-numbers
|
||||
/>
|
||||
</n-card>
|
||||
<n-button type="primary" @click="handleCopy(submission!.code)">
|
||||
{{ copied ? "成功复制" : "复制代码" }}
|
||||
</n-button>
|
||||
<n-data-table
|
||||
v-if="submission.info && submission.info.data"
|
||||
:columns="columns"
|
||||
@@ -94,8 +87,4 @@ onMounted(init)
|
||||
.code {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.copyBtn {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Submission } from "utils/types"
|
||||
import { adminRejudge, getSubmissions } from "oj/api"
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import { useUserStore } from "~/shared/store/user"
|
||||
import { LANGUAGE_SHOW_VALUE } from "~/utils/constants"
|
||||
|
||||
interface Query {
|
||||
username: string
|
||||
@@ -136,9 +137,7 @@ const columns = computed(() => {
|
||||
{
|
||||
text: true,
|
||||
type: "info",
|
||||
onClick: () => {
|
||||
router.push("/submission/" + row.id)
|
||||
},
|
||||
onClick: () => router.push("/submission/" + row.id),
|
||||
},
|
||||
() => row.id.slice(0, 12)
|
||||
)
|
||||
@@ -191,7 +190,12 @@ const columns = computed(() => {
|
||||
width: 120,
|
||||
render: (row) => submissionMemoryFormat(row.statistic_info.memory_cost),
|
||||
},
|
||||
{ title: "语言", key: "language", width: 120 },
|
||||
{
|
||||
title: "语言",
|
||||
key: "language",
|
||||
width: 120,
|
||||
render: (row) => LANGUAGE_SHOW_VALUE[row.language],
|
||||
},
|
||||
{
|
||||
title: "用户",
|
||||
key: "username",
|
||||
|
||||
Reference in New Issue
Block a user