function(config) {var config = config || {};}这种写法是什么意思
App.BookStore = function(config) {
var config = config || {}; //我很想知道这种写法是什么意思
Ext.applyIf(config, {
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'Item',
id: 'ASIN',
totalRecords: '@total'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
{name: 'Author', mapping: 'ItemAttributes > Author'},
'Title',
'Manufacturer',
'ProductGroup',
// Detail URL is not part of the column model of the grid
'DetailPageURL'
])
});
// call the superclass's constructor
App.BookStore.superclass.constructor.call(this, config);
};