{ label: '操作', name: 'value.state', width: 30, align: 'center', formatter: function (value, options, row) {
if (value === 0) {
return '<a onclick="vm.delBtn(\''+row["key"].template_id+'\')" shiro:hasPermission="sys:user:delete" class="label label-primary">删除 </a>';
}
if (value === 1) {
return '<a class="label label-primary">发送</a>' +
'<a onclick="vm.delBtn(\''+row["key"].template_id+'\')" shiro:hasPermission="sys:user:delete" class="label label-primary">删除</a>';
}
if (value === 2) {
return '<a @click="update" shiro:hasPermission="sys:user:update" class="label label-primary">修改</a>' +
'<a onclick="vm.delBtn(\''+row["key"].template_id+'\')" shiro:hasPermission="sys:user:delete" class="label label-primary">删除</a>';
}
} },
after formatter
The first parameter represents the data of the current cell;
The second one has not been used for the time being, it should be the three options set by jqGrid;
The third parameter is all the data of the row.
row["name"]