在 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