测试点小方块本身带颜色、悬停有结果名,后面再写一遍是重复;耗时和内存在课堂上没人看。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a8918b41b1
commit
2fafb25959
1 file changed
+1
-20
@@ -12,11 +12,7 @@ import {
|
|||||||
LANGUAGE_SHOW_VALUE,
|
LANGUAGE_SHOW_VALUE,
|
||||||
SubmissionStatus,
|
SubmissionStatus,
|
||||||
} from "utils/constants"
|
} from "utils/constants"
|
||||||
import {
|
import { submissionCaseResults } from "utils/functions"
|
||||||
submissionCaseResults,
|
|
||||||
submissionMemoryFormat,
|
|
||||||
submissionTimeFormat,
|
|
||||||
} from "utils/functions"
|
|
||||||
import type { Submission, SubmissionListItem } from "utils/types"
|
import type { Submission, SubmissionListItem } from "utils/types"
|
||||||
import { useCopySubmission } from "../composables/copySubmission"
|
import { useCopySubmission } from "../composables/copySubmission"
|
||||||
import { useTone } from "../composables/tone"
|
import { useTone } from "../composables/tone"
|
||||||
@@ -202,16 +198,6 @@ watch(
|
|||||||
() => (rawOpen.value = false),
|
() => (rawOpen.value = false),
|
||||||
)
|
)
|
||||||
|
|
||||||
const failedCaseText = computed(() => {
|
|
||||||
const bad = cases.value
|
|
||||||
.map((item, index) => ({ item, index }))
|
|
||||||
.filter(({ item }) => item.result !== SubmissionStatus.accepted)
|
|
||||||
if (!bad.length) return ""
|
|
||||||
const names = bad.map(({ index }) => index + 1).join("、")
|
|
||||||
const kinds = new Set(bad.map(({ item }) => JUDGE_STATUS[item.result]?.name ?? ""))
|
|
||||||
return kinds.size === 1 ? `测试点 ${names} ${[...kinds][0]}` : `测试点 ${names} 没通过`
|
|
||||||
})
|
|
||||||
|
|
||||||
function caseColor(result: number) {
|
function caseColor(result: number) {
|
||||||
if (result === SubmissionStatus.accepted) return tone("success").solid
|
if (result === SubmissionStatus.accepted) return tone("success").solid
|
||||||
if (result === SubmissionStatus.runtime_error) return tone("warning").solid
|
if (result === SubmissionStatus.runtime_error) return tone("warning").solid
|
||||||
@@ -368,7 +354,6 @@ function openStandalone() {
|
|||||||
>
|
>
|
||||||
{{ index + 1 }}
|
{{ index + 1 }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="failedCaseText" class="muted">{{ failedCaseText }}</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-else-if="row.caseSummary && row.caseSummary.passed < row.caseSummary.total"
|
v-else-if="row.caseSummary && row.caseSummary.passed < row.caseSummary.total"
|
||||||
@@ -379,10 +364,6 @@ function openStandalone() {
|
|||||||
</span>
|
</span>
|
||||||
<span>{{ LANGUAGE_SHOW_VALUE[row.language] }}</span>
|
<span>{{ LANGUAGE_SHOW_VALUE[row.language] }}</span>
|
||||||
<span>{{ submissionTimeText(row.createTime, true) }}</span>
|
<span>{{ submissionTimeText(row.createTime, true) }}</span>
|
||||||
<template v-if="row.statisticInfo?.time_cost !== undefined">
|
|
||||||
<span>耗时 {{ submissionTimeFormat(row.statisticInfo.time_cost) }}</span>
|
|
||||||
<span>内存 {{ submissionMemoryFormat(row.statisticInfo.memory_cost) }}</span>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 看不到代码的三种情况 -->
|
<!-- 看不到代码的三种情况 -->
|
||||||
|
|||||||
Reference in new issue
Block a user