我正在寻找一个在组合(选择)中启用显示树的组件。类似的东西:http: //www.jeasyui.com/demo/index.php
但是这个组件不允许直接导入 JSON,只能从文件中导入。
它以这种方式工作:
$('#cc').combotree({
url:'tree_data.json'
});
我需要(伪代码):
$('#cc').combotree({
data:'[{"id":1,"text":"City","children":[{"id":11,"text":"Wyoming","children":[{"id":111,"text":"Albin"}]}]}]'
});
或(伪代码):
$('#cc').combotree({
data:'<?php $json_string; ?>'
});
可能吗?或者,也许您知道任何能够做到这一点的组件?
问候,克里斯