From 33796336d546fa61a3906500ea56d77c960ab222 Mon Sep 17 00:00:00 2001 From: “shentao” Date: Fri, 21 Oct 2016 15:05:13 +0800 Subject: GSO-35 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3ad00c3c9265a1b3818decedca1d77995864ba29 Signed-off-by: “shentao” --- .../zTree/api/cn/zTreeObj.expandNode.html | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.expandNode.html (limited to 'openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.expandNode.html') diff --git a/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.expandNode.html b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.expandNode.html new file mode 100644 index 00000000..5d96d3f5 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.expandNode.html @@ -0,0 +1,50 @@ +
+
+

Function(treeNode, expandFlag, sonSign, focus, callbackFlag)zTreeObj.expandNode

+

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

+
+

+
+

展开 / 折叠 指定的节点

+

v3.x 中执行此方法可以触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数。便于减少冗余代码

+

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

+
+
+

Function 参数说明

+
+

treeNodeJSON

+

需要 展开 / 折叠 的节点数据

+

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

+

expandFlagBoolean

+

expandFlag = true 表示 展开 节点

+

expandFlag = false 表示 折叠 节点

+

省略此参数,则根据对此节点的展开状态进行 toggle 切换

+

sonSignBoolean

+

sonSign = true 表示 全部子孙节点 进行与 expandFlag 相同的操作

+

sonSign = false 表示 只影响此节点,对于其 子孙节点无任何影响

+

sonSign = false 且 treeNode.open = expandFlag 时,不会触发回调函数,直接返回

+

省略此参数,等同于 false

+

focusBoolean

+

focus = true 表示 展开 / 折叠 操作后,通过设置焦点保证此焦点进入可视区域内

+

focus = false 表示 展开 / 折叠 操作后,不设置任何焦点

+

省略此参数,等同于 true

+

callbackFlagBoolean

+

callbackFlag = true 表示执行此方法时触发 beforeExpand / onExpand 或 beforeCollapse / onCollapse 事件回调函数

+

callbackFlag = false 表示执行此方法时不触发事件回调函数

+

省略此参数,等同于 false

+

返回值Boolean

+

返回值表示最终实际操作情况

+

true 表示 展开 节点

+

false 表示 折叠 节点

+

null 表示 不是父节点

+
+

function 举例

+

1. 展开当前选择的第一个节点(包括其全部子节点)

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