0๐
<template>
<div id="app">
<label>
<input type="radio" @click="handleFirstRadioClick" />
test1
</label>
<label class="radio-2">
<input type="radio" :checked="secondRadioValue" />
test2
</label>
</div>
</template>
<script>
export default {
name: "App",
data() {
return {
secondRadioValue: false,
};
},
methods: {
handleFirstRadioClick() {
return (this.secondRadioValue = true);
},
},
};
</script>
Full example:
https://codesandbox.io/s/amazing-dust-hen6w?file=/src/App.vue
- [Vuejs]-Stop the multiple display of an element in VueJS โ Fancybox
- [Vuejs]-How to update root data in vue router beforeEach
Source:stackexchange.com