jQuery MiniUI

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

关于miniui tree的问题 [复制链接]

Rank: 2

跳转到指定楼层
楼主
发表于 2017-6-29 13:05:23 |只看该作者 |倒序浏览
关于miniui tree的问题,首次加载的一棵树
<ul id="tree1" class="mini-tree"
                            url="<%=request.getContextPath()%>/commonQueryAction.do?method=treeData"
                            style="width:250px;padding:5px;"
                            showTreeIcon="true" textField="text" idField="id"
                        >
, 完了我重新加载另一棵树
var tree = tree = mini.get("tree1");
tree.setUrl('./tree.txt'); 导致第二棵树的expanded属性失效,全部默认展开了。

下面是第二棵树的 数据格式。
[
    {id: "base", text: "Base",expanded:true,
        children: [
            {id: "ajax", text: "Ajax"}
        ]
    },
    {id: "forms", text: "Forms", expanded:false,
        children: [
            {id: "button", text: "Button"}]
    }
}]

Rank: 8Rank: 8

沙发
发表于 2017-6-29 15:48:27 |只看该作者
本地测试未发现你说的问题,请提供第一次加载的数据。

Archiver|普加软件

GMT+8, 2024-10-7 03:30 , Processed in 1.036444 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部