jQuery MiniUI
标题:
mini-tree加载服务器返回的json数据
[打印本页]
作者:
joyoes
时间:
2021-7-30 18:26:43
标题:
mini-tree加载服务器返回的json数据
本帖最后由 joyoes 于 2021-7-30 18:29 编辑
服务器返回的json数据如下:
{
"code": 0,
"data": [{
"id": 4,
"jbhId": 16,
"pid": 0,
"name": "根节点",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 42,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": "2021-07-30 15:47:18",
"updatedAt": "2021-07-30 15:47:18",
"deletedAt": null
}, {
"id": 5,
"jbhId": 16,
"pid": 4,
"name": "(一)子节点",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 42,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}, {
"id": 6,
"jbhId": 16,
"pid": 4,
"name": "(二)dfsd",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 0,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}, {
"id": 7,
"jbhId": 16,
"pid": 4,
"name": "(三)gsf",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 0,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}, {
"id": 8,
"jbhId": 16,
"pid": 4,
"name": "(四)dsf",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 0,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}, {
"id": 9,
"jbhId": 16,
"pid": 4,
"name": "(五)fgfsg",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 0,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}, {
"id": 10,
"jbhId": 16,
"pid": 4,
"name": "(六)fgfdg",
"vipUnitShortName": "",
"vipCount": 0,
"createdBy": 0,
"updatedBy": 0,
"status": 0,
"vipUnitSortId": 0,
"remark": "",
"createdAt": null,
"updatedAt": null,
"deletedAt": null
}],
"msg": "success"
}
复制代码
如何按上面的json格式数据,成功加载到mini-tree中去啊?有没有可以在html的mini-tree标签上直接设置加载数据节点的属性啊?
作者:
joyoes
时间:
2021-7-30 18:38:37
明白了,是设置dataField="data"来加载
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2