jQuery MiniUI

 找回密码
 立即注册
查看: 5843|回复: 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, 2026-2-16 01:33 , Processed in 1.363053 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部