bootstrap-table 根据行数据设置是否可选

发布于 分类: 各种框架 1144
columns : [
								{
									checkbox : true,
									formatter:function(){
		 if (row.state == true)  							 
                return {  
                    disabled : true,//设置是否可用  
                    checked : true//设置选中  
                };  
            return value;   
                                                                            
									}

								},{
									field : 'company_name',
									width : 90,
									title : '单位'
								},{
									field : 'car_number',
									width : 90,
									title : '车牌号'
								}, {
									field : 'car_model',
									width : 170,
									title : '厂牌型号',
									formatter : function(value, row, index) {
										return value;
									}
								}, {
									field : 'next_mileage',
									title : '下次保养里程(KM)',
									width : 170,
									formatter : function(value, row, index) {
										return row.mileage+5000;
									}
								} 
       ]


赞 888

关于作者:xiaona

一个喜欢研究的前端工程师。

请进入“Zblog后台” -> “畅言” 登陆你的畅言账号。