add contest details.

This commit is contained in:
2023-03-30 18:49:32 +08:00
parent 301fc1be6d
commit eb652d1c86
10 changed files with 153 additions and 23 deletions

View File

@@ -91,7 +91,10 @@ const tagOptions = computed(() =>
)
async function getProblemDetail() {
if (!props.problemID) return
if (!props.problemID) {
toggleReady(true)
return
}
const { data } = await getProblem(props.problemID)
toggleReady(true)
problem.id = data.id
@@ -307,12 +310,6 @@ async function submit() {
}
onMounted(() => {
if (
route.name === "admin problem create" ||
route.name === "admin contest problem create"
) {
toggleReady(true)
}
listTags()
getProblemDetail()
})