Browse Source

table组件增加toolbar渲染完毕后的回调函数

pull/1991/head
102157-丁兵兵 6 months ago
parent
commit
8dc98445a3
  1. 2
      dist/layui.js
  2. 2
      dist/layui.js.map
  3. 8
      src/modules/table.js

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

2
dist/layui.js.map vendored

File diff suppressed because one or more lines are too long

8
src/modules/table.js

@ -624,6 +624,11 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
var that = this
var options = that.config
// 工具栏渲染完成回调
var toolbarRenderComplete = function(){
typeof options.toolbarRenderComplete === 'function' && options.toolbarRenderComplete();
};
// 添加工具栏左侧模板
var leftDefaultTemp = [
'<div class="layui-inline" lay-event="add"><i class="layui-icon layui-icon-add-1"></i></div>',
@ -671,6 +676,8 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
});
}
that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));
toolbarRenderComplete();
};
// 分页栏
@ -1013,6 +1020,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
);
};
opts = opts || {};
// 数据拉取前的回调

Loading…
Cancel
Save