From 8e873dde1dfa365ab419524a16f76eef98b0764f Mon Sep 17 00:00:00 2001 From: sunxiaobin89 <285584806@qq.com> Date: Fri, 26 May 2023 13:43:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20treeTable=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=8A=82=E7=82=B9=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E8=8A=82=E7=82=B9=E5=AF=B9=E8=B1=A1=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=87=A0=E4=B8=AA=E5=B8=B8=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=8A=82=E7=82=B9=E6=96=B9=E6=B3=95=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/treeTable.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/treeTable.js b/src/modules/treeTable.js index 0a699de8..92a90c84 100644 --- a/src/modules/treeTable.js +++ b/src/modules/treeTable.js @@ -372,6 +372,22 @@ layui.define(['table'], function (exports) { dataIndex: treeNodeData[LAY_DATA_INDEX], getParentNode: function () { return that.getNodeByIndex(treeNodeData[LAY_PARENT_INDEX]) + }, + update: function (data) { + return treeTable.updateNode(tableId, index, data) + }, + remove: function () { + return treeTable.removeNode(tableId, index) + }, + expand: function (opts) { + return treeTable.expandNode(tableId, $.extend({}, opts, { + index: index + })) + }, + setChecked: function (opts) { + return treeTable.setRowChecked(tableId, $.extend({}, opts, { + index: index + })) } };