【问题标题】:How do I make the theme dots reappear in jsTree?如何让主题点重新出现在 jsTree 中?
【发布时间】:2019-12-05 20:23:20
【问题描述】:

我设置了 jsTree,它与 jSON 配合得很好。更改我的 JSON 结构后,这些点似乎停止工作。 下面是我的代码。我从这里收到了 JSON 代码 https://www.js-tutorials.com/jquery-tutorials/jstree-example-href-jstree-search-node-scrollbar/

  $(document).ready(function(){
    $('#jstree').jstree({

        plugins: ["themes","html_data", "state", "wholerow"],
        'core' : {
             'themes' : {
            'theme' : "apple",
            'dots' : true,
            'icons' : false
        },
            'data' : jsonTreeData
        }
        }).bind("select_node.jstree", function (e, data) {
         var href = data.node.a_attr.href;
         var parentId = data.node.a_attr.parent_id;
         if(href == '#')
         return '';

         window.open(href);

    });
    $('#jstree').slimScroll({
        height: '200px'
    });
     $('#jstree').showDots();

  });

【问题讨论】:

    标签: jquery jstree


    【解决方案1】:

    您的 JSON 数据结构似乎不是 wholerow 插件。这是此插件的默认行为。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      • 2018-08-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多