Event.getParam值是否重复多次?

时间:2018-08-23 05:47:05

标签: javascript jquery angularjs salesforce-lightning

父母行动:

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}"/>

with event.getparam

如果我们删除

  saveBatchDetails: function(component,event,helper){
           console.log("calling updateRaces in ListRaceController");
           var param1 = event.getParam('param1');
           console.log(param1);

After removoing event.param

如果我们删除event.getparam,则Event.getparam将复制多个时间

0 个答案:

没有答案