zTreeObj.cancelEditName.html 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>Function(newName)</span><span class="path">zTreeObj.</span>cancelEditName</h2>
  4. <h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.exedit</span> 扩展 js ]</span></h3>
  5. <div class="desc">
  6. <p></p>
  7. <div class="longdesc">
  8. <p>取消节点的编辑名称状态,可以恢复原名称,也可以强行赋给新的名称。</p>
  9. <p class="highlight_red">请通过 zTree 对象执行此方法。</p>
  10. </div>
  11. </div>
  12. <h3>Function 参数说明</h3>
  13. <div class="desc">
  14. <h4><b>newName</b><span>String</span></h4>
  15. <p>重新给定的新名称。</p>
  16. <p class="highlight_red">如果省略此参数,则恢复原名称。</p>
  17. <h4 class="topLine"><b>返回值</b><span>无</span></h4>
  18. <p>目前无任何返回值</p>
  19. </div>
  20. <h3>function 举例</h3>
  21. <h4>1. 取消 zTree 的编辑名称状态,恢复该节点原有名称</h4>
  22. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  23. treeObj.cancelEditName();
  24. </code></pre>
  25. <h4>2. 取消 zTree 的编辑名称状态,并且重新设定该节点名称</h4>
  26. <pre xmlns=""><code>var treeObj = $.fn.zTree.getZTreeObj("tree");
  27. treeObj.cancelEditName("test_new_name");
  28. </code></pre>
  29. </div>
  30. </div>