如图:(取消后的样式)
(如果选项中有不同的样式)
<el-radio-group v-model="List"> <el-radio label="绝对测量法" style="margin-bottom: 100px;" @click.prevent.native="checkRadio1('绝对测量法')"></el-radio> </el-radio-group>
js
//方法
checkRadio1(val) { val == List ? List = '' : List = val },
(如果没有不同的样式)
<el-radio-group v-model="List"> <el-radio v-for="item in OptionList1" :key="item.name" :label="item.name" @click.prevent.native="checkRadio1(item.name)">{{item.name}}</el-radio> </el-radio-group>
js
OptionList1: [
{ id: '1', name: '支架' },
{ id: '0', name: '连接件' },
],
//方法
checkRadio1(val) { val == List ? List = '' : List = val },
标签:选项,name,val,单选框,样式,List,element,勾选,id From: https://www.cnblogs.com/huang2979127746/p/17376623.html