add radio

This commit is contained in:
2025-05-31 18:32:07 +02:00
parent 3172ed8d5f
commit 29a6fcb2fb
2 changed files with 22 additions and 9 deletions
+20 -7
View File
@@ -1,15 +1,28 @@
<template>
<table class="emphased">
<tr>
<td>Très bien</td>
<td>Bien</td>
<td>Passable</td>
<td>Insuffisant</td>
<td>À rejeter</td>
</tr>
<tbody>
<tr>
<td v-for="(val, index) in values" :id="`${questionId}-${val}`" :key="index">
<input type="radio" :value="val" :name="String(questionId)">
<label :for="`${questionId}-${val}`">{{ val }}</label>
</td>
</tr>
</tbody>
</table>
</template>
<script setup lang="ts">
interface Props {
values?: string[]
questionId: string
}
const { values = ["Très bien", "Bien", "Passable", "Insuffisant", "À rejeter"], questionId } = defineProps<Props>()
</script>
<style scoped="true" lang="css">
.emphased {
border: 1px solid #444;