mirror of https://github.com/layui/layui
修复 treeTable 树表初始化无数据的时候新增一条数据报错的问题
parent
3d10bd68f7
commit
3fecf6dcc9
|
@ -1303,6 +1303,11 @@ layui.define(['table'], function (exports) {
|
|||
// 将新节点添加到页面
|
||||
tableData = that.initData();
|
||||
|
||||
if (tableViewElem.find('.layui-none').length) {
|
||||
table.renderData(id);
|
||||
return newNodes;
|
||||
}
|
||||
|
||||
var newNodesHtml = table.getTrHtml(id, newNodes);
|
||||
var newNodesHtmlObj = {
|
||||
trs: $(newNodesHtml.trs.join('')),
|
||||
|
|
Loading…
Reference in New Issue