在 SAP 中,从控制器中的另一个方法调用事件函数
建议不要从任何其他函数调用事件函数,但是你可以在单独的函数中重构事件函数实现并从其他任何函数中调用它,如下所示
示例
BtnPress: function(oEvent) {
// Separate the implementation in the helper function
this.btnPressHelper();
}
// Define the helper
btnPressHelper: function() {
//logic here
}
// call the helper from whichever function you want to get the desired output
PerformSomething: function() {
this.btnTapHelper();
}
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 语言编程
C++
C#
MongoDB
MySQL
Javascript
PHP