mmq_lh 2009-06-01 00:51
浏览 206
已采纳

Ext建立动态树时出现的问题?

我用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}
]}
]}
]

  • 写回答

3条回答 默认 最新

  • zhoujuan520 2009-06-01 08:54
    关注

    Ext.BLANK_IMAGE_URL = '../ext-3.0-rc1/resources/images/default/s.gif';

    在Ext.onReady()中加上上面的代码,注意你自己的路径

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值