我想从 doinit 访问变量到 saveexpenses 方法。我正在尝试访问 saveExpense 中的临时变量。控制台抛出未定义
({
doInit: function(component, event, helper) {
helper.getMatrix(component, event);
helper.getRolesConverted(component, event);
var temp=0;
},
saveExpenses: function(component, event, helper) {
helper.saveExpenses(component, event);
console.log('temp value ',temp);
},
});