共计 682 个字符,预计需要花费 2 分钟才能阅读完成。
0. 修改前表格
1. 添加代码
{
field: 'gymc',
title: '工艺名称',
formatter: function (value, row, index) {
return 'div style="width:120px;">' + value + '
‘;
}
}
return 'div style="width:120px;">' + value + '';
{
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. 修改后表格
原文地址: 【若依】表格固定列宽
正文完