修复 treeTable 树表初始化无数据的时候新增一条数据报错的问题

pull/1273/head
sunxiaobin89 2023-06-07 16:00:29 +08:00
parent 3d10bd68f7
commit 3fecf6dcc9
1 changed files with 5 additions and 0 deletions

View File

@ -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('')),