From c6774f38741f78e481a3b3c9b9903f74dfc6d0bf Mon Sep 17 00:00:00 2001 From: sunxiaobin89 <285584806@qq.com> Date: Fri, 28 Apr 2023 18:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20treeTable=20`updateNode`?= =?UTF-8?q?=20=E6=89=A7=E8=A1=8C=E6=B2=A1=E6=9C=89=E8=B5=B7=E4=BD=9C?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/treeTable.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/treeTable.js b/src/modules/treeTable.js index cdd12b92..c22bfbf7 100644 --- a/src/modules/treeTable.js +++ b/src/modules/treeTable.js @@ -323,6 +323,7 @@ layui.define(['table'], function (exports) { var dataCache = table.cache[tableId][index]; if (newValue !== 'delete' && dataCache) { + $.extend(dataCache, newValue); return clone ? $.extend({}, dataCache) : dataCache; } @@ -978,6 +979,7 @@ layui.define(['table'], function (exports) { tableView.find('.layui-table-' + item + ' tbody tr[lay-data-index="' + index + '"]').replaceWith($(trNew[['trs', 'trs_fixed', 'trs_fixed_r'][i]].join('')).attr({ 'data-index': trIndex, 'lay-data-index': index, + 'data-level': trLevel })); }); that.renderTreeTable(tableView.find('tr[lay-data-index="' + index + '"]'), trLevel);