修改后台目录和创建比赛的时间设置

This commit is contained in:
2025-05-09 20:56:40 +08:00
parent c05136a0be
commit 14462000c5
13 changed files with 187 additions and 123 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { Icon } from "@iconify/vue"
import { CONTEST_STATUS } from "utils/constants"
import { CONTEST_STATUS, ContestStatus } from "utils/constants"
import { isDesktop } from "~/shared/composables/breakpoints"
import { useContestStore } from "../store/contest"
import ContestInfo from "./components/ContestInfo.vue"
@@ -21,13 +21,20 @@ async function check() {
}
}
watch(
() => contestStore.contestStatus,
(nv, ov) => {
if (nv === ContestStatus.underway && ov == ContestStatus.not_started) {
contestStore.init(props.contestID)
}
},
)
onMounted(() => {
contestStore.init(props.contestID)
})
onBeforeUnmount(() => {
contestStore.clear()
})
onBeforeUnmount(contestStore.clear)
const passwordFormVisible = computed(
() =>