本文共 719 字,大约阅读时间需要 2 分钟。
译自:http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.Class
List of short aliases for class names. Most useful for defining xtypes for widgets:
('MyApp.CoolPanel', { extend: '', alias: ['widget.coolpanel'], title: 'Yeah!'});// Using ('widget.coolpanel');// Using the shorthand for defining widgets by xtype('panel', { items: [ { xtype: 'coolpanel', html: 'Foo'}, { xtype: 'coolpanel', html: 'Bar'} ]});
Besides "widget" for xtype there are alias namespaces like "feature" for ftype and "plugin" for ptype.
Available since: 4.0.2
此处,
alias: ['widget.coolpanel'],则可以通过以下方式访问(创建):
var panel = Ext.widget('coolpanel');
另外,widget为xtype而定义;feature为ftype而定义;plugin为ptype而定义。
转载地址:http://bpmxi.baihongyu.com/