# MatchMessageCompetition AI Competition Format Selection Component
A component for selecting competition formats in AI match scenarios, supporting display and selection of multiple competition format types.
# Import
import PressMatchMessageCompetition from "press-next/press-match-message-competition/press-match-message-competition";
# Usage
# Basic Usage
<template>
<PressMatchMessageCompetition
:competition-formats="competitionFormats"
@format-click="handleFormatClick"
/>
</template>
<script setup>
const competitionFormats = [
{
id: 1,
name: "Single Elimination",
description: "Losers are eliminated, winners advance to next round",
},
{
id: 2,
name: "Double Elimination",
description: "Losers get one chance to comeback, fairer format",
},
{
id: 3,
name: "Round Robin",
description: "All teams play against each other, ranked by points",
},
];
const handleFormatClick = (format) => {
console.log("Selected format:", format);
};
</script>
# API
# Props
| Parameter | Description | Type | Default |
|---|---|---|---|
| competition-formats | Format list | CompetitionFormat[] | [] |
# Events
| Event Name | Description | Parameters |
|---|---|---|
| format-click | Click format option | format: CompetitionFormat |
# CompetitionFormat Type
| Property | Description | Type | Default |
|---|---|---|---|
| id | Unique identifier | string | number | - |
| name | Format name | string | - |
| description | Format description | string | - |
| icon | IconPlus URL | string | - |