1
我有這些擴展:定義項的默認的xtype在擴展類
Ext.define('Common.view.superstuff.SuperCheckboxGroup', {
extend: 'Ext.form.CheckboxGroup',
alias: 'widget.supercbgroup', ...
Ext.define('Common.view.superstuff.SuperCheckbox', {
extend: 'Ext.form.Checkbox',
alias: 'widget.supercb', ...
有沒有辦法有Common.view.superstuff.SuperCheckboxGroup
默認xtype: supercb
的項目?
我已經試過的方法是這樣的:
Ext.define('Common.view.superstuff.SuperCheckboxGroup', {
extend: 'Ext.form.CheckboxGroup',
alias: 'widget.supercbgroup',
items: {xtype: 'supercb'}, ...
和:
Ext.define('Common.view.superstuff.SuperCheckboxGroup', {
extend: 'Ext.form.CheckboxGroup',
alias: 'widget.supercbgroup',
config: {
items: {xtype: 'supercb'}
}, ...
但這些不工作。
我已確認,如果我在確認框中指定xtype: 'supercb'
創建複選框組時,它確實可以正常工作。
想知道是否可以定義默認xtype
?
http://docs.sencha.com/extjs/5.1/5.1.1-apidocs/#!/api/Ext.container.Container-cfg-defaultType –