提交 339fae5f authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 bc89e294
<script setup lang="ts">
import type { Contest } from '../types'
import { contestMode } from '@/utils/dictionary'
interface Props {
data: Contest
}
......@@ -8,6 +9,10 @@ const props = defineProps<Props>()
const isMy = $computed(() => {
return !!props.data.login_id
})
const typeText = $computed(() => {
return contestMode[props.data.type]
})
</script>
<template>
......@@ -17,6 +22,12 @@ const isMy = $computed(() => {
<div class="contest-item-main__inner">
<img :src="data.logo" class="logo" />
<div class="cover">
<ul class="info-list" v-if="isMy">
<li>姓名:{{ data.student_name }}</li>
<li>参赛ID:{{ data.login_id }}</li>
<li>参赛形式:{{ typeText }}</li>
<li>所属学校:{{ data.org_name }}</li>
</ul>
<router-link :to="`/student/contest/lab/${data.id}`" target="_blank" v-if="isMy">
<el-button round type="primary">我要训练</el-button>
</router-link>
......@@ -74,7 +85,13 @@ const isMy = $computed(() => {
flex-direction: column;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.7);
.info-list {
padding: 10px;
font-size: 14px;
color: #fff;
line-height: 24px;
}
}
}
.contest-item-name {
......
......@@ -4,7 +4,7 @@ export const json2Array = function (data: any, isValueToNumber = true) {
}
// 参赛模式
export const contestMode = {
export const contestMode: Record<string, any> = {
1: '个人赛'
}
// 参赛模式列表
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论