Element 单选框 el-radio 点击改变触发事件使用示例
转载声明:
本文为摘录自“csdn博客”,版权归原作者所有。
温馨提示:
为了更好的体验,请点击原文链接进行浏览
摘录时间:
2020-12-07 22:40:23
效果:
代码:
<el-radio-group v-model="radioTreaty" @change="agreeChange">
<el-radio label="1" border>不同意</el-radio>
<el-radio label="2" border>同意</el-radio>
</el-radio-group>
<el-button type="primary" :disabled="btnstatus" @click="orderSubmit" style="width: 180px;">提交订单</el-button>
export default {
data() {
return {
radioTreaty: '1',
btnstatus:true,
}
},
methods: {
agreeChange:function(val){
let that = this
that.btnstatus=(val==='1')?true:false;
}
}
}