0

json からツリービューを生成したいのですが、入力する必要があります。ツリービューのノードの「attr or .date」はどうすればいいですか?

data = [{
  "text": "Item 1",
  "attr": {
    "id": 12145646541 "class": "folder"
  }
}, {
  "text": "Item 2",
  "nodes": [{
    "text": "Item 2.1"
  }, {
    "text": "Item 2.2"
  }, {
    "text": "Item 2.3"
  }]
}, {
  "text": "Item 3"
}, {
  "text": "Item 4"
}]

$("#ul_menu").wijtree({
  nodes: data
});

<ul id="ul_menu"></ul>
4

1 に答える 1

0

Wijtree を json オブジェクトとして外部データソースにバインドする方法について説明しているこのブログ記事をご覧ください: http://wijmo.com/populate-wijtree-from-external-data-source-using-knockout/

于 2013-07-22T08:14:36.020 に答える