我用Ext建立动态树,在FF和IE刚开始显示正常,但逐渐显示下图的现象。
[img]http://www.iteye.com/upload/attachment/109699/b707ea8f-4baf-323d-ba10-e66efa97751d.bmp[/img]正常
[img]http://www.iteye.com/upload/attachment/109701/4a54b55f-36c4-3801-af37-14dadcb0c9e7.bmp[/img]节点左出现白框
[img]http://www.iteye.com/upload/attachment/109703/c349da0c-5a81-3ab6-9126-b6cdaeda990c.bmp[/img]逐渐增多
不知什么原因,请大家指点!
树的源码: tree.js
//------------- 井查询树的定义 -----------------
Ext.onReady(function(){
var welltree = new Ext.tree.TreePanel({
el: 'west',
autoScroll:true,
animate:true,
//默认根目录不显示
rootVisible:false,
border:false,
animate:true,
lines:true,
enableDD:true,
containerScroll:true,
loader: new Ext.tree.TreeLoader({
dataUrl: 'data.txt'
})
}) ;
var root = new Ext.tree.AsyncTreeNode({text:'数据库数据'});
welltree.setRootNode(root) ;
welltree.render();
root.expand();
})
产生节点的数据文件 data.txt
[
{text:'辽河油田', children:[
{text:'兴隆台采油厂', children:[
{text:'兴区块', leaf: true},
{text:'马圈子区块', leaf: true},
{text:'开区块', leaf: true},
{text:'于区块', leaf: true},
{text:'双区块', leaf: true},
{text:'黄区块', leaf: true},
{text:'荣区块', leaf: true},
{text:'台区块', leaf: true}
]},
{text:'沈阳采油厂', children:[
{text:'曹区块', leaf: true},
{text:'法区块', leaf: true},
{text:'沈区块', leaf: true},
{text:'边台潜山区块', leaf: true},
{text:'大民屯', leaf: true},
{text:'前区块', leaf: true},
{text:'静区块', leaf: true},
{text:'长区块', leaf: true}
]},
{text:'欢喜岭采油厂', children:[
{text:'欢2块', leaf: true},
{text:'欢612块', leaf: true},
{text:'欢其它区块', leaf: true},
{text:'齐40块', leaf: true},
{text:'齐108块', leaf: true},
{text:'齐2块', leaf: true},
{text:'齐其它区块', leaf: true}
]}
]}
]