父母行动:
function.php
子组件:
// set call back
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
var qli=response.getReturnValue();
var key=0;
for (key in qli){
var qliindexno=qli[key].Id;
var qlisaved=qli[key].QliRowNum__c;
var appEvent = $A.get("e.c:ClearValues");
appEvent.setParams({ "param1" : qliindexno});
console.log('NOuyd123');
appEvent.fire();
console.log('NOuyd');
key++;
}
}
});
儿童动作:
<aura:handler event="c:ClearValues" action="{!c.saveBatchDetails}"/>
如果我们删除
saveBatchDetails: function(component,event,helper){
console.log("calling updateRaces in ListRaceController");
var param1 = event.getParam('param1');
console.log(param1);
如果我们删除event.getparam,则Event.getparam将复制多个时间