Extjs 选择器

Standard
  1. 基于xtype查找组件: var panels = Ext.ComponentQuery.query(‘panel’);
  2. 查找二级xtype:var buttons = Ext.ComponentQuery.query(‘panel button’);
  3. 基于属性值检索组件:var saveButton = Ext.ComponentQuery.query(‘button[action=”saveUser”]’);
  4. 混合查找组件:var buttonsAndTextfields = Ext.ComonentQuery.query(‘button, textfield’);
  5. 基于ID查找组件:var usersPanel = Ext.ComponentQuery.query(‘#usersPanel’);
  6. 基于组件的presence(不太明白这个应该怎么翻译):var extraOptionsComponents = Ext.ComponentQuery.query(‘component[extraOptions]’);
  7. 使用组件的成员方法查找:var validField = Ext.ComponentQuery.query(‘form > textfield{isValid()}’);
   1: var panels = Ext.ComponentQuery.query('panel');
   2: var buttons = Ext.ComponentQuery.query('panel button');
   3: var saveButton = Ext.ComponentQuery.query('button[action="saveUser"]');
   4: var buttonsAndTextfields = Ext.ComonentQuery.query('button, textfield');
   5: var usersPanel = Ext.ComponentQuery.query('#usersPanel');
   6: var extraOptionsComponents = Ext.ComponentQuery.query('component[extraOptions]');
   7: var validField = Ext.ComponentQuery.query('form > textfield{isValid()}');

发表评论

电子邮件地址不会被公开。 必填项已用*标注