- 注册时间
- 2012-7-1
- 最后登录
- 2013-10-29
- 阅读权限
- 10
- 积分
- 410
- 精华
- 0
- 帖子
- 121
|
niko 发表于 2012-7-13 10:14
过滤树示例:
http://www.miniui.com/demo/#src=tree/filtertree.html
我按照的这个例子的
<script type="text/javascript">
mini.parse();
var tree3 = mini.get("tree3");
tree3.filter(function (node) {
var text = node.text ? node.text.toLowerCase() : "";
if (text.indexOf("layouts") != -1) {
return true;
}
});
tree3.loadData([
{ id: "lists", text: "Lists", expanded: false,
children: [
{ id: "datagrid", text: "DataGrid" },
{ id: "tree", text: "Tree" },
{ id: "treegrid", text: "TreeGrid " }
]
},
{ id: "layouts", text: "Layouts", expanded: false,
children: [
{ id: "panel", text: "Panel" },
{ id: "splitter", text: "Splitter" },
{ id: "layout", text: "Layout " }
]
},
{ id: "navigations", text: "Navigations", expanded: false,
children: [
{ id: "pager", text: "Pager" },
{ id: "tabs", text: "Tabs" },
{ id: "navbar", text: "NavBar" },
{ id: "menu", text: "Menu" }
]
}
]);
</script>
SCRIPT438: 对象不支持“filter”属性或方法
createtree - 副本 - 副本.html, 行27 字符8
说之没有这个属性方法
我下载了最新的UI包做的例子 好想也不行呢? |
|