Answer the question
In order to leave comments, you need to log in
How to make only one checkbox alternately selected?
Good day) It is necessary that when you click on the Second checkbox, the checkbox is unchecked from the First one, and vice versa) Can someone help) Thank you) Here is the code:
<template lang="pug">
div
div(v-for='item in items')
v-checkbox(v-model='item.checked' :label='item.text' :value='item.id' hide-details='')
</template>
<script>
export default {
data () {
return {
checked: true,
items: [
{text: 'Первый1', checked: true},
{text: 'Первый2', checked: false},
]
}
}
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question