From 3f148a9086465859e46340ef3af8745a07325a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20`treeTable.reloadData()`?= =?UTF-8?q?=20=E5=9C=A8=E6=9F=90=E4=BA=9B=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=20Closes:=20https?= =?UTF-8?q?://gitee.com/layui/layui/issues/I8M5HS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/treeTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/treeTable.js b/src/modules/treeTable.js index 016cecd1..d8d3ad91 100644 --- a/src/modules/treeTable.js +++ b/src/modules/treeTable.js @@ -93,7 +93,7 @@ layui.define(['table'], function (exports) { var updateCache = function (id, childrenKey, data) { var tableCache = table.cache[id]; layui.each(data || tableCache, function (index, item) { - var itemDataIndex = item[LAY_DATA_INDEX]; + var itemDataIndex = item[LAY_DATA_INDEX] || ''; if (itemDataIndex.indexOf('-') !== -1) { tableCache[itemDataIndex] = item }