<el-radio-group v-model="form.fundus" :disabled="detail">
<el-radio label="1" :disabled="detail" @click.native="clickitemYandiTest($event)">正常</el-radio>
<el-radio label="2" :disabled="detail" @click.native="clickitemYandiTest($event)">异常</el-radio>
</el-radio-group>
clickitemYandiTest($event){
let _this = this;
let objVal = _this.form.fundus;
// alert(this.yandiFlags)
window.setTimeout(() => {
if (!!objVal && objVal == $event.target.value) {
$event.target.checked = false
_this.form.fundus = ''
}
}, 0);
}

这段代码展示了在Vue中如何处理<el-radio-group>组件的禁用状态,并通过clickitemYandiTest方法来响应点击事件。当选项被选中时,如果其值与当前表单中的fundus字段匹配,则会取消选中并清空fundus字段。
1672

被折叠的 条评论
为什么被折叠?



