Commit 5473c1da authored by xiaoye's avatar xiaoye

Update tournament.vue

parent b83a082d
Pipeline #37937 passed with stages
in 1 minute and 33 seconds
......@@ -154,6 +154,14 @@
<uni-icons type = 'trash' color = 'red'></uni-icons>
</view>
<span v-show = 'i.quit' class = 'small'>已退赛</span>
<view
class = 'button'
:style = "{ '--color' : 'gray' }"
@click = 'tournament.operatorChk(participant.undo, [i])'
v-show = 'i.quit'
>
<uni-icons type = 'undo'></uni-icons>
</view>
</view>
</template>
</uni-list-item>
......@@ -575,6 +583,13 @@
if (tournament.this.status == 'Ready' ? await del() : await update())
await tournament.search();
},
undo : async(i : Participant) : Promise<void> => {
if (await Tabulator.Participant.Update(Mycard.token, i.id, {
name : i.name,
quit : false
}))
await tournament.search();
},
update : async (Data : TournamentCreateObject) : Promise<void> => {
// @ts-ignore
if (await Tabulator.Tournament.Update(Mycard.token, tournament.this.id, Data))
......
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