这句啥意思?
for (var i = 0; i < types.length; ++i) {
(
function(type) {
pageObject[type] = function(e) {
var key = type + ‘Size’
var changedData = {}
changedData[key] =
this.data[key] === ‘default’ ? ‘mini’ : ‘default’
this.setData(changedData)
}
}
)(types[i])
}
后面跟(types[i]),能指点一下吗?