关于Extjs获取容器和元素的方法

关于Extjs获取容器和元素的方法

playboy5566发布于 2018-06-08

1、当前对象的父对象(上级对象)

this.ownerCt: 

2、当前对象的下一个相邻的对象

this.nextSibling(); 

3、当前对象的上一个相邻的对象

this.previousSibling(); 

4、当前容器中的第一个子对象

this.get(0); (这个好像在Ext6.0不能用了,我用着不好使)
this.items.first(); 

5、当前容器的最后一个子对象

this.items.last(); 

6、查找当前对象的所有上级匹配的容器

this.findParentByType(String xtype) 

7、查找当前对象的所有下级匹配的组件

this.findByType(String xtype)

8、向上匹配查找组件

this.up("xtype") //with xtype
this.up('#foo') //with itemsId; itemId:'foo'

9、向下匹配查找组件

this.down("xtype")   

10、匹配任意组件(常用)

Ext.ComponemtQuery("#id")
Ext.ComponemtQuery("xtype")
Ext.ComponemtQuery("xtype[title="..."]")
         
posted on 2022-06-13 13:45  xsSystem  阅读(57)  评论(0编辑  收藏  举报