- 注册时间
- 2013-3-14
- 最后登录
- 2024-11-11
- 阅读权限
- 10
- 积分
- 1550
- 精华
- 0
- 帖子
- 208
|
本帖最后由 joyoes 于 2020-3-24 07:01 编辑
我参考了http://miniui.com/demo/#src=treegrid/drawcell.html
的例子,发现从服务器端获取的json格式数据没有像total、msg之类的字段,而是直接加载列表数据,但如果服务器端返回的json数据带到这几个字段时,mini-treegrid要如何设置才能加载data字段下面的json数据啊?
比如服务器返回的json格式数据是:
{
msg:200,
total:100,
data:[{id:1,name:"张三"},{id:2,name:"李四"}]
}
而示例中返回的json格式是这样的:
- [{
- "UID": "1",
- "Name": "项目范围规划",
- "Duration": 8,
- "Start": "2007-01-01T00:00:00",
- "Finish": "2007-01-10T00:00:00",
- "PercentComplete": 0,
- "Summary": 1,
- "Critical": 0,
- "Milestone": 0,
- "PredecessorLink": [],
- "ParentTaskUID": -1
- },
- {
- "UID": "2",
- "Name": "确定项目范围",
- "Duration": 1,
- "Start": "2007-01-01T00:00:00",
- "Finish": "2007-01-01T23:23:59",
- "PercentComplete": 30,
- "Summary": 0,
- "Critical": 0,
- "Milestone": 0,
- "PredecessorLink": [],
- "ParentTaskUID": "1"
- }]
复制代码
|
|