我有几个组合框。我想干掉默认选项,所以我这样做了:
var defaultComboOptions = {
displayField: 'name',
emptyText: 'Select a site...',
enableKeyEvents: true,
forceSelection: true,
listWidth: 300,
selectOnFocus: true,
triggerAction: 'all',
typeAhead: true,
typeAheadDelay: 125,
valueField: 'id',
width: 150,
xtype: 'combo'
};
var cbSites = new Ext.form.ComboBox(Ext.extend(defaultComboOptions, {
id:"myId",
x:200,
y:100,
listeners:{
}
}));
我只想在组合框的每个实例中添加不同之处。
我可以在 JQuery 中使用 a 来做到这一点,$.Extend(....
但我只是不理解 ExtJS。
谢谢