diff options
author | “shentao” <shentao@chinamobile.com> | 2016-10-21 15:05:13 +0800 |
---|---|---|
committer | “shentao” <shentao@chinamobile.com> | 2016-10-21 15:05:13 +0800 |
commit | 33796336d546fa61a3906500ea56d77c960ab222 (patch) | |
tree | eada1477041dd418b05122654eb25682a2dbf2eb /openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html | |
parent | 9a7b8cfb0e8182d0d69d73ee40c0116042bc2e5e (diff) |
GSO-35
Change-Id: I3ad00c3c9265a1b3818decedca1d77995864ba29
Signed-off-by: “shentao” <shentao@chinamobile.com>
Diffstat (limited to 'openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html')
-rw-r--r-- | openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html new file mode 100644 index 00000000..9c9180b9 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/thirdparty/zTree/api/cn/zTreeObj.moveNode.html @@ -0,0 +1,46 @@ +<div class="apiDetail"> +<div> + <h2><span>Function(targetNode, treeNode, moveType, isSilent)</span><span class="path">zTreeObj.</span>moveNode</h2> + <h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3> + <div class="desc"> + <p></p> + <div class="longdesc"> + <p>移动节点。</p> + <p class="highlight_red">请通过 zTree 对象执行此方法。</p> + </div> + </div> + <h3>Function 参数说明</h3> + <div class="desc"> + <h4><b>targetNode</b><span>JSON</span></h4> + <p>要移动到的目标节点 JSON 数据</p> + <p class="highlight_red">如果移动成为根节点,请设置 targetNode 为 null 即可</p> + <p class="highlight_red">请务必保证此节点数据对象 是 zTree 内部的数据对象</p> + <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4> + <p>需要被移动的节点数据</p> + <p class="highlight_red">请务必保证此节点数据对象 是 zTree 内部的数据对象</p> + <h4 class="topLine"><b>moveType</b><span>String</span></h4> + <p>指定移动到目标节点的相对位置</p> + <p class="highlight_red">"inner":成为子节点,"prev":成为同级前一个节点,"next":成为同级后一个节点</p> + <h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4> + <p>设定移动节点后是否自动展开父节点。</p> + <p>isSilent = true 时,不展开父节点,其他值或缺省状态都自动展开。</p> + <h4 class="topLine"><b>返回值</b><span>JSON</span></h4> + <p>返回值是最终被移动的节点数据,正常情况下与 treeNode 参数完全相同</p> + <p class="highlight_red">如果 返回值 为 null,说明 移动失败,主要原因有:<br/> + 1、targetNode 是 treeNode 父节点,且 moveType = "inner"<br/> + 2、targetNode 是 treeNode 子孙节点 + </p> + </div> + <h3>function 举例</h3> + <h4>1. 将根节点中第二个节点 移动成为 第一个节点的子节点</h4> + <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree"); +var nodes = treeObj.getNodes(); +treeObj.moveNode(nodes[0], nodes[1], "inner"); +</code></pre> + <h4>2. 将根节点中第二个节点 移动成为 第一个节点的前一个节点</h4> + <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree"); +var nodes = treeObj.getNodes(); +treeObj.moveNode(nodes[0], nodes[1], "prev"); +</code></pre> +</div> +</div>
\ No newline at end of file |