add access.

This commit is contained in:
2023-01-31 11:11:42 +08:00
parent be6e9eaaef
commit 6aa722c64a
8 changed files with 207 additions and 77 deletions

View File

@@ -0,0 +1,20 @@
<script setup lang="ts">
import { Contest } from "~/utils/types"
import { ContestType } from "~/utils/constants"
interface Props {
contest: Contest
}
const props = defineProps<Props>()
const isPrivate = computed(
() => props.contest.contest_type === ContestType.private
)
</script>
<template>
<n-tag :type="isPrivate ? 'error' : 'default'">
{{ isPrivate ? "需要密码" : "公开" }}
</n-tag>
</template>