bootstrap-table回显选中⾏,⾏样式{
filed:'status',
checkbox:true,
formatter:function(value,row,index){
if (row.status == 1)  //根据⾏⾥字段判断是否选中
return {
checked : true//设置选中
};
return value;
}
}bootstrap 5
⾏样式:
rowStyle: function (row, index) {
//这⾥有5个取值代表5中颜⾊['active', 'success', 'info', 'warning', 'danger'];
var strclass = "";
if (row.name == "删除环境") {
strclass = 'danger';//还有⼀个active
}
else if (row.name == "新增环境") {
strclass = 'success';
}
else {
return {};
}
return { classes: strclass }
},

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。