直接在html中寫<ul><li>(只能寫在li標籤中,以<span>的寫法是無效的)html
<ul id="tt" class="easyui-tree"> <li data-options="iconCls:'icon-add'"> <span>Folder</span> <ul>
經過遠程url加載tree數據,在JSON中寫icon樣式ui
[{ "id": 1, "text": "Node 1", "iconCls":"icon-save", "state": "closed", "children": [{ "id": 11, "text": "Node 11" },{ "id": 12, "text": "Node 12" }] },{ "id": 2, "text": "Node 2", "state": "closed" }]