从UI5文档:
如果从另一个具有(或可能获得)init()方法的控件继承,则需要显式调用它...
由于Button控件到目前为止还没有init()函数(但在将来的版本中可能存在),我会这样做,以便将来安全:
if (sap.ui.commons.Button.prototype.init) { // check whether superclass has an init() method
sap.ui.commons.Button.prototype.init.apply(this, arguments); // call super.init()
}
Run Code Online (Sandbox Code Playgroud)
希望这对你有所帮助.
| 归档时间: |
|
| 查看次数: |
1646 次 |
| 最近记录: |