setting.edit.removeTitle.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <div class="apiDetail">
  2. <div>
  3. <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>removeTitle</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>删除按钮的 Title 辅助信息。<span class="highlight_red">[setting.edit.enable = true & setting.edit.showRemoveBtn = true 时生效]</span></p>
  9. <p>默认值:"remove"</p>
  10. </div>
  11. </div>
  12. <h3>String 格式说明</h3>
  13. <div class="desc">
  14. <p>鼠标移动到 删除按钮 上时,浏览器自动弹出的辅助信息内容,可根据用户需要自行修改</p>
  15. </div>
  16. <h3>Function 参数说明</h3>
  17. <div class="desc">
  18. <h4><b>treeId</b><span>String</span></h4>
  19. <p>对应 zTree 的 <b class="highlight_red">treeId</b>,便于用户操控</p>
  20. <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>
  21. <p>需要设置删除按钮 Title 信息的节点 JSON 数据对象</p>
  22. <h4 class="topLine"><b>返回值</b><span>String</span></h4>
  23. <p>返回值同 String 格式的数据</p>
  24. </div>
  25. <h3>setting & function 举例</h3>
  26. <h4>1. 设置删除按钮的 Title 辅助信息为: "删除节点"</h4>
  27. <pre xmlns=""><code>var setting = {
  28. edit: {
  29. enable: true,
  30. showRemoveBtn: true,
  31. removeTitle: "删除节点"
  32. }
  33. };
  34. ......</code></pre>
  35. <h4>2. 设置父节点删除按钮的 Title 辅助信息为: "删除父节点"</h4>
  36. <pre xmlns=""><code>function setRemoveTitle(treeId, treeNode) {
  37. return treeNode.isParent ? "删除父节点":"删除叶子节点";
  38. }
  39. var setting = {
  40. edit: {
  41. enable: true,
  42. showRemoveBtn: true,
  43. removeTitle: setRemoveTitle
  44. }
  45. };
  46. ......</code></pre>
  47. </div>
  48. </div>