Commit 2a169cce authored by xiaoye's avatar xiaoye

对阵图(新建文件)

parent a333cdb0
<template>
<uni-card
:is-full = 'true'
title = '对阵图'
>
</uni-card>
</template>
<script setup lang = 'ts'>
import { defineProps, onMounted, watch } from 'vue';
import Match from '../script/match';
import Participant from '../script/participant';
const props = defineProps(['matches', 'participants']) as {
matches : Array<Match>,
participants : Array<Participant>
};
const getName = (id : number) : string => {
const p = props.participants.find(i => i.id == id);
return p?.name ?? '';
}
</script>
<style scoped lang = 'scss'>
</style>
\ No newline at end of file
......@@ -277,6 +277,15 @@
</uni-pagination>
</uni-card>
</transition>
<!--
<transition name = 'switch'>
<MatchTree
v-show = "match.array.length > 0 && tournament.this.rule == 'SingleElimination'"
:matches = 'match.array'
:participants = 'participant.array'
></MatchTree>
</transition>
-->
</uni-card>
</transition>
</view>
......@@ -292,6 +301,8 @@
import Const from '../script/const.ts'
import Mycard from '../script/mycard.ts';
import {TournamentCreateObject, MatchUpdateObject, TournamentGet, ParticipantUpdateObject} from '../script/type.ts'
import MatchTree from './matchTree.vue';
let tournament = reactive({
this : undefined as undefined | Tournament,
status : {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment