fix(比赛): 后台「审核」按钮从来不显示,老师进不去 ACM 审核页
判的是 `props.contest.rule_type === "ACM"`,而 rule_type 是阶段 0 砍掉 OI 模式时删掉的字段 —— 后端和契约里都不存在,`undefined === "ACM"` 恒为 false。路由、页面、接口都在(实测 acm-helper 返回 200),只有这个 入口按钮被自己判没了。 比赛只有 ACM 模式,条件直接去掉。 这条本来就在 vue-tsc 的既有错误里(TS2339: Property 'rule_type' does not exist),只是之前没人跑,所以没人看见。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,21 +42,13 @@ async function clone() {
|
|||||||
message.error("复制失败")
|
message.error("复制失败")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const isACM = computed(() => props.contest.rule_type === "ACM")
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<n-flex>
|
<n-flex>
|
||||||
<n-button size="small" type="primary" secondary @click="goEditProblems">
|
<n-button size="small" type="primary" secondary @click="goEditProblems">
|
||||||
题目
|
题目
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button
|
<n-button size="small" type="warning" secondary @click="goACMHelper">
|
||||||
v-if="isACM"
|
|
||||||
size="small"
|
|
||||||
type="warning"
|
|
||||||
secondary
|
|
||||||
@click="goACMHelper"
|
|
||||||
>
|
|
||||||
审核
|
审核
|
||||||
</n-button>
|
</n-button>
|
||||||
<n-button size="small" type="info" secondary @click="goEdit">
|
<n-button size="small" type="info" secondary @click="goEdit">
|
||||||
|
|||||||
Reference in New Issue
Block a user