- layui.table.on('row(operateEvent)', function (obj) {
- var tableDiv;
- var index = $(obj.tr.selector).attr('data-index');
- var tableBox = $(obj.tr.selector).parents('.layui-table-box');
- // 存在固定列
- if (tableBox.find(".layui-table-fixed.layui-table-fixed-l").length>0) {
- tableDiv = tableBox.find(".layui-table-fixed.layui-table-fixed-l");
- } else {
- tableDiv = tableBox.find(".layui-table-body.layui-table-main");
- }
- var checkCell = tableDiv.find("tr[data-index=" + index + "]").find("td div.layui-table-cell div.layui-form-radio");
- checkCell.on("click", function (e) {
- $(this).off();
- e.stopPropagation();
- });
- checkCell.find('i').click();
- });
来源: http://www.jianshu.com/p/1ae087874e6a