我有一个 ExtJs 商店。
var fieldsStore = new Ext.create('Ext.data.Store', {
model : 'FieldsModel',
proxy : {
type : 'ajax',
url : 'queryBuilder_getQueryDetails',
extraParams : {
queryID : queryID
},
reader : {
type : 'json'
}
},
listeners : {
load : function(store, records, successful, operation, eOpts) {
if (successful) {
records.forEach(function(rec) {
// default settings: if datatype is INTEGER - SUM
if (rec.get('fieldType') == 'INTEGER') {
rec.set('fieldSettingKey', 'SUM');
rec.set('fieldSettingValue', 'Sum');
} else {
// else select ROWHEADER by default
rec.set('fieldSettingKey', 'ROWHEADER');
rec.set('fieldSettingValue', 'Row Header');
}
});
store.commitChanges();
}
}
}
});
现在,当我执行 fieldsStore.proxy.extraParams.queryID = arrQuery.queryId;
时,我在 Internet Explorer 中遇到错误。不在 Chrome 或 FF 中,但仅在 IE 中。
它表示 fieldsStore.proxy.extraParams
为空或未定义。
任何人都可以帮助解释为什么这只发生在 IE 中吗?
最佳答案
你也可以试试这个
fieldsStore.getProxy().setExtraParam( 'queryID', arrQuery.queryId );
关于javascript - Extjs store.proxy.extraParams 仅在 Internet Explorer 中未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16853457/