【问题标题】:How to get the Parent hierarchy in the Tree View object如何在树视图对象中获取父层次结构
【发布时间】:2017-06-13 07:49:37
【问题描述】:

您好,我有一个带有父对象和嵌套子对象的树对象,以显示带有复选框的树。如果检查了孩子,我需要获取父母和祖父母的名字,直到孔层次结构。我下面的 json 在检查时检查了 true 属性

    {
      [
        Name: All,
        checked: false,
        children: [
          {
            Name: 'software',
children: [
              {
                Name: 'children1',
                checked: true,
                children: [
                  {
                    Name: 'childen2',
                    checked: true
                  }
                ]
              }
            ]
          }
        ]
      ]
    }

在 Json Children2 中被选中意味着我需要像这样的格式 所有 -> 软件 ->children1 ->children 2 那样...

【问题讨论】:

    标签: javascript arrays filter nested treeview


    【解决方案1】:

    这符合您的要求: jquery-bonsai

    【讨论】:

      猜你喜欢
      • 2012-03-11
      • 2013-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-29
      • 1970-01-01
      • 2011-09-28
      • 2016-09-06
      相关资源
      最近更新 更多