extjs 4 initComponent?
initComponent 和constructor 的参数问题?
initComponent 可以取得constructor 中的参数吗?怎样取得? 2012-3-15
例证:
<script type="text/javascript"> // Ext.define('Desktop',{ extend:'Ext.panel.Panel', app:null, initComponent:function(){ alert('app='+this.app); //注意此处 this.app 是 App 而不是null } }); // Ext.define('App',{ constructor:function(){ var me=this; desktopCfg=me.getDesktopConfig(); new Desktop(desktopCfg); }, getDesktopConfig:function(){ var me=this, cfg={ app:me } return cfg; } }); Ext.onReady(function(){ new App(); }) </script>
相关推荐
InJavaWeTrust 2020-05-15
Chydar 2012-09-20
natejeams 2020-01-15
zcpHappy 2014-01-11
pythonclass 2019-11-07
JF0 2019-11-03
ElementW 2015-02-15
干货集合 2014-05-14
kaiya0 2012-06-13
cscscssjsp 2012-03-05
drinow 2019-07-12
coderMozart 2019-06-30
t0ckh 2012-11-11
中等偏下 2017-02-22
nicepainkiller 2016-07-26
xiaoren 2016-02-10
云帆大数据 2016-01-11