0. 修改前表格
1. 添加代码
{
field: 'gymc',
title: '工艺名称',
formatter: function (value, row, index) {
return '<div style="width:120px;">' + value + '</div>';
}
}
return '<div style="width:120px;">' + value + '</div>';
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return '<div style="width:100px;">' + actions.join('') +'</div>';
}
}
return '<div style="width:100px;">' + actions.join('') +'</div>';
2. 修改后表格