2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Two-way value binding is defined using <i>v-model</i>.</p>
|
|
|
|
</DocSectionText>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="card flex justify-center">
|
|
|
|
<div class="flex flex-wrap gap-4">
|
|
|
|
<div class="flex items-center">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
|
|
|
<label for="ingredient1" class="ml-2">Cheese</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
|
|
|
<label for="ingredient2" class="ml-2">Mushroom</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
|
|
|
<label for="ingredient3" class="ml-2">Pepper</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-02-28 08:29:30 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
|
|
|
<label for="ingredient4" class="ml-2">Onion</label>
|
|
|
|
</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">
|
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient1" class="ml-2">Cheese</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient2" class="ml-2">Mushroom</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient3" class="ml-2">Pepper</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient4" class="ml-2">Onion</label>
|
|
|
|
</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">
|
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient1" class="ml-2">Cheese</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient2" class="ml-2">Mushroom</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient3" class="ml-2">Pepper</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient4" class="ml-2">Onion</label>
|
|
|
|
</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">
|
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient1" name="pizza" value="Cheese" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient1" class="ml-2">Cheese</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient2" name="pizza" value="Mushroom" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient2" class="ml-2">Mushroom</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient3" name="pizza" value="Pepper" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient3" class="ml-2">Pepper</label>
|
|
|
|
</div>
|
2024-05-20 12:14:38 +00:00
|
|
|
<div class="flex items-center">
|
2023-03-17 06:35:13 +00:00
|
|
|
<RadioButton v-model="ingredient" inputId="ingredient4" name="pizza" value="Onion" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<label for="ingredient4" class="ml-2">Onion</label>
|
|
|
|
</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>
|