2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
2024-10-30 11:18:22 +00:00
|
|
|
<p>RadioButton is used with the <i>v-model</i> property for two-way value binding.</p>
|
2023-02-28 08:29:30 +00:00
|
|
|
</DocSectionText>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
|
|
|
<div class="flex flex-wrap gap-4">
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient1">Cheese</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient2">Mushroom</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient3">Pepper</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient4">Onion</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
ingredient: '',
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex flex-wrap gap-4">
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient1">Cheese</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient2">Mushroom</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient3">Pepper</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient4">Onion</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2023-10-15 09:38:39 +00:00
|
|
|
</div>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
|
|
|
<div class="flex flex-wrap gap-4">
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient1">Cheese</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient2">Mushroom</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient3">Pepper</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient4">Onion</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
ingredient: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
|
|
|
<div class="flex flex-wrap gap-4">
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient1">Cheese</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient2">Mushroom</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient3">Pepper</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
2024-10-24 14:25:44 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2024-10-24 14:25:44 +00:00
|
|
|
<label for="ingredient4">Onion</label>
|
2023-02-28 08:29:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const ingredient = ref('');
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|