Extjs4快速查找组件的方法

    xiaoxiao2021-03-25  107

    译自:http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.ComponentQuery

    代码1:

                        var win = Ext.widget('remarkWin');                     win.show();                     var fxry = win.down('textfield[name=xm]');                     console.dir(fxry);                     console.dir(fxry.getValue());                    

    代码2:

    /**  * 矫正管理-综合报到-人机配置-备注信息窗口  */ Ext.define('cdkj.view.manage.allocation.RemarkWin', { extend : 'Ext.Window', alias : 'widget.remarkWin', title: '备注信息' , layout: 'fit' , width: 350 , height:250 , resizable: false , buttonAlign: 'right' , items : { xtype : "form", margin : 10, border : 0, // labelWidth : 90, items: [{ xtype : 'textfield', // width : 310, labelWidth : 60, anchor:"100%", // valueField : 'pk_id', // displayField : 'cname', fieldLabel : '服刑人员', editable : false, allowBlank : false, name:'xm', // shadow : false, // mode : 'local', forceSelection : true, // triggerAction : 'all', // typeAhead : true, readOnly:true }, { columnWidth: .3 , layout: 'form' , border: false , items: [{ xtype: 'textarea' , id: 'remarksss' , name: 'remarksss' , fieldLabel: '备      注' , allowBlank: false , blankText: '备注信息不能为空!' , anchor: '98%', height:110, labelWidth : 60, }] }] }, buttons : [       {id : 'remarkSave',text : "保存",action : 'bind'},       {id :'remarkClose',text : '关闭',action : 'colse',       handler : function(btn){       btn.up('window').close();       }       } ] })

    转载请注明原文地址: https://ju.6miu.com/read-19332.html

    最新回复(0)