jQuery MiniUI

 找回密码
 立即注册
查看: 34561|回复: 0
打印 上一主题 下一主题

Tree:加载列表数据   [复制链接]

Rank: 4

楼主
发表于 2012-7-5 20:48:04 |显示全部楼层
针对这个情况,MiniUI Tree提供了一种直接加载列表数据,Tree内部进行数据转换的方式。
1)从数据库查询出一个列表数据
2)通过JSON方式返回
省略了原来的第2个步骤
这个不太明白 能具体点吗
后台返回怎么样的数据啊
[
{ id:"miniui",text:"miniui",expanded: true,
children[
        {id: "base", text: "Base", expanded: false,
                children: [
                        {id: "ajax", text: "Ajax", url: "../../docs/api/ajax.html", target:"_blank"},
                        {id: "json", text: "JSON", url: "../../docs/api/ajax.html", target:"_blank"}                       
                ]
        },
        {id: "forms", text: "Forms", expanded: false,
                children: [
                        {id: "button", text: "Button", url: "../../docs/api/button.html", target:"_blank"},
                        {id: "listbox", text: "ListBox", url: "../../docs/api/listbox.html", target:"_blank"},
                        {id: "checkboxlist", text: "CheckBoxList", url: "../../docs/api/checkboxlist.html", target:"_blank"},
                        {id: "radiolist", text: "RadioList", url: "../../docs/api/radiolist.html", target:"_blank"}
                ]
        }
        ]}
]
不需要在后台封装成这样的吗?

Archiver|普加软件

GMT+8, 2024-5-9 10:26 , Processed in 1.038959 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部