json数据是这样的
[
{"id":"n-0","text":"super","unfold":true,"par":""},
{"id":"n-1","text":"fish","unfold":true,"par":"n-0"},
{"id":"n-2","text":"school","unfold":true,"par":"n-0"},
{"id":"n-3","text":"good","unfold":false,"par":"n-1"},
{"id":"n-4","text":"qwer","unfold":false,"par":"n-1"},
{"id":"n-5","text":"dadxx","unfold":false,"par":"n-2"},
{"id":"n-6","text":"584","unfold":false,"par":"n-5"}
]
要生成一个这种的dom树
请大家帮忙解决一下
可以用 jsTree,你的数据需要格式化为固定格式,参考:https://www.jstree.com/docs/j...