TreePanel 参数
1. animate: true //展开动画
2. autoHeight:t rue //自动高度,默认为false
3. enableDreg: true //允许拖动
4. enableDD: true //允许拖动,并改变节点层次结构
5. enableDrop: true //允许删除
6. lines: true //节点虚线
7. loader: Ext.tree.TreeLoader //
8. root: Ext.tree.TreeNode //
9. rootVisible: true //显示根节点
10. trackMouseOver: false //mouseOver无效
11.useArrows: true //使用小箭头
12. dataUrl: 'your url' //数据源(需要JSON格式)
TreeNode参数
1. checked: false //复选框,True|False,不写就没有
2. expanded: true //展开,默认为不展开
3. href: "href url" //超链接地址
4. hrefTarget : "href target" //超链接对象域
5. qtip : "提示" //提示信息,不过要Ext.QuickTips.Init()一下
6. leaf: true //叶节点
7. text: ' 文本'
8. id: 'ID'
9. singleClickExpand: true //单击文本展开,默认为双击展开
Tree事件
tree.on('click',function({
alert(node.id); //node即当前选定的节点
}););
遇到的问题
1. 在没网络的情况下s.gif不显示
解决:Ext.BLANK_IMAGE_URL="ext/resources/images/default/s.gif"; //URL写成你本地的地址,默认是extjs的官网