Salesforce Lightning 在JS controller中调用另一个JS方法

1.使用Helper

将需要封装重复调用的方法封装在helper中,通过helper.functionName调用。

2.直接在JS Controller内部调用

var a = component.get('c.functionName');
$A.enqueueAction(a);

猜你喜欢

转载自blog.csdn.net/rosechan/article/details/79361004