Ext4.2 treepanel treestore node节点里的所有属性

 

可查看帮助文档中的

Ext.data.NodeInterface的属性就是了,

Ext.data.NodeInterface
allowDrag : Boolean
设置为false禁止拖动本节点 ...

allowDrop : Boolean
设置为false禁止(将其它节点)拖到本节点。 ...

checked : Boolean
设置为true或者false,在节点旁显示一个复选框。 ...

children : Ext.data.NodeInterface[]
子节点数组。

cls : String
应用于本节点的CSS类。

depth : Number
本节点的父节点的个数。根节点depth为0,它的子节点depth为1,依此类推……

expandable : Boolean
设置为true允许展开和折叠当前节点。 ...

expanded : Boolean
True如果节点是展开的。 ...

href : String
链接URL
 
hrefTarget : String
链接对象。只有指定href之后可用。

icon : String
本节点的图标的URL

iconCls : String
应用于本节点的图标的CSS类。

index : Number
节点在父节点中的位置(译者注: 原文有错。应该是,节点在兄弟节点中的位置)。 ...

isFirst : Boolean
True如果本节点是第一个节点。

isLast : Boolean
True如果本节点是最后的节点。

leaf : Boolean
设置为true表明本节点没有子节点。 ...

loaded : Boolean
True如果节点加载完成 ...

loading : Boolean
True如果节点正在加载。 ...

parentId : String
父节点ID。

qtip : String
本节点上显示的Tooltip文本。

qtitle : String
Tooltip标题。

root : Boolean
True如果本节点是根节点。

text : String
本节点标签上的文本。

 

源码中

Ext.define('Ext.data.NodeInterface', {
...
	this.applyFields(modelClass, [
	    { name : 'parentId',   type : idType,    defaultValue : null,  useNull : idField.useNull },
	    { name : 'index',      type : 'int',     defaultValue : 0,     persist : false          , convert: null },
	    { name : 'depth',      type : 'int',     defaultValue : 0,     persist : false          , convert: null },
	    { name : 'expanded',   type : 'bool',    defaultValue : false, persist : false          , convert: null },
	    { name : 'expandable', type : 'bool',    defaultValue : true,  persist : false          , convert: null },
	    { name : 'checked',    type : 'auto',    defaultValue : null,  persist : false          , convert: null },
	    { name : 'leaf',       type : 'bool',    defaultValue : false                            },
	    { name : 'cls',        type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'iconCls',    type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'icon',       type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'root',       type : 'boolean', defaultValue : false, persist : false          , convert: null },
	    { name : 'isLast',     type : 'boolean', defaultValue : false, persist : false          , convert: null },
	    { name : 'isFirst',    type : 'boolean', defaultValue : false, persist : false          , convert: null },
	    { name : 'allowDrop',  type : 'boolean', defaultValue : true,  persist : false          , convert: null },
	    { name : 'allowDrag',  type : 'boolean', defaultValue : true,  persist : false          , convert: null },
	    { name : 'loaded',     type : 'boolean', defaultValue : false, persist : false          , convert: null },
	    { name : 'loading',    type : 'boolean', defaultValue : false, persist : false          , convert: null },
	    { name : 'href',       type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'hrefTarget', type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'qtip',       type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'qtitle',     type : 'string',  defaultValue : '',    persist : false          , convert: null },
	    { name : 'qshowDelay', type : 'int',     defaultValue : 0,     persist : false          , convert: null },
	    { name : 'children',   type : 'auto',    defaultValue : null,  persist : false          , convert: null }
	]);

  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值