优化 table 调整行内点击设置活动行的和执行事件的调用顺序

pull/1281/head
sunxiaobin89 2023-06-13 18:10:55 +08:00
parent 9f9c2a72eb
commit f57f36199c
1 changed files with 3 additions and 2 deletions

View File

@ -2444,6 +2444,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
var othis = $(this);
var td = othis.closest('td');
var index = othis.parents('tr').eq(0).data('index');
// 标记当前活动行
that.setRowActive(index);
// 执行事件
layui.event.call(
this,
@ -2456,8 +2459,6 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
}
})
);
// 标记当前活动行
that.setRowActive(index);
};
// 行工具条单击事件