开发者

How can I default objects?

开发者 https://www.devze.com 2023-03-14 22:09 出处:网络
I want to do the equivalent of... //Nonsensical开发者_如何学JAVA config.items=[Ext.create(\'Foo.register.AccountTypeForm\',{config:arguments.hidden=true})];

I want to do the equivalent of...

//Nonsensical开发者_如何学JAVA
config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments.hidden=true})];

//works ofc, but it looks untidy
arguments.hidden=true;
config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments})];


Could you do this?

config.items=[Ext.create('Foo.register.AccountTypeForm',
 {config:{hidden:true}})];

Or do you need reference the arguments object again later?

0

精彩评论

暂无评论...
验证码 换一张
取 消