饿了么表格实现按条件禁用复选框

在 el-table-column type 类型为 selection 组件中,添加 :selectable='方法名'

<el-table-column type="selection" width="55" :selectable="selected"> </el-table-column>

methods中:判断后台给返回的状态码

selected(row, index) {
	if (row.WaitConfirmRecord.is_confirm == 1) {
		return false //不可勾选
	} else {
		return true; //可勾选
	}
},

这样就可以实现了表格按条件禁用复选框的功能了

猜你喜欢

转载自blog.csdn.net/m0_70547044/article/details/127605016
今日推荐