vuejs中怎么实现按钮组单选

vuejs中怎么实现按钮组单选


开满天机
浏览 1003回答 3
3回答

凤凰求蛊

<input type="radio" id="one" value="One" v-model="picked"><label for="one">One</label><br><input type="radio" id="two" value="Two" v-model="picked"><label for="two">Two</label><br><span>Picked: {{ picked }}</span>

慕村225694

<template><div class="m-board"><input type="radio" id="one" value="One" v-model="picked"><label for="one">One</label><br><input type="radio" id="two" value="Two" v-model="picked"><label for="two">Two</label><br><span>Picked: {{ picked }}</span></div></template><script>export default {data(){return {picked:false}},updated(){console.log(this.picked);}}</script>&nbsp;

一只名叫tom的猫

<input type="radio" id="one" value="One" v-model="picked"><label for="one">One</label><br><input type="radio" id="two" value="Two" v-model="picked"><label for="two">Two</label><br><span>Picked: {{ picked }}</span>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js