Element 单选框 el-radio 点击改变触发事件使用示例

Element 单选框 el-radio 点击改变触发事件使用示例_第1张图片

<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;
        }
    }
}

你可能感兴趣的:(vue.js,前端,javascript)