From 21d72c4a80fe2937d0c4ddd20624b27adbcd989b Mon Sep 17 00:00:00 2001 From: lizi00164331 Date: Mon, 7 Aug 2017 11:39:39 +0800 Subject: Upload the ESR GUI seed code Issue-ID: AAI-68 Change-Id: Ia50ce0570c2fabecd77199d4e8454f56fe587c4e Signed-off-by: lizi00164331 --- .../zTree/api/cn/zTreeObj.getNodeIndex.html | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html (limited to 'common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html') diff --git a/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html new file mode 100644 index 0000000..b2c757d --- /dev/null +++ b/common/src/main/webapp/thirdparty/zTree/api/cn/zTreeObj.getNodeIndex.html @@ -0,0 +1,30 @@ +
+
+

Function(treeNode)zTreeObj.getNodeIndex

+

概述[ 依赖 jquery.ztree.core 核心 js ]

+
+

+
+

获取某节点在同级节点中的序号(从0开始)

+

请通过 zTree 对象执行此方法。

+
+
+

Function 参数说明

+
+

treeNodeJSON

+

需要查询顺序的节点 JSON 数据对象

+

请务必保证此节点数据对象 是 zTree 内部的数据对象

+

返回值Number

+

返回值从 0 开始计数

+

如果不存在该节点数据,返回 -1

+
+

function 举例

+

1. 获取当前选中的第一个节点在同级节点中的序号

+
var treeObj = $.fn.zTree.getZTreeObj("tree");
+var nodes = treeObj.getSelectedNodes();
+if (nodes.length>0) {
+	var index = treeObj.getNodeIndex(nodes[0]);
+}
+
+
+
\ No newline at end of file -- cgit 1.2.3-korg