OpenUI5: TypeError: this.getAutoPrefixId is not a function
OpenUI5: TypeError: this.getAutoPrefixId is not a function
我正在 OpenUI5+NodeJS 上编写一个小应用程序。当我调用 index.html
时,浏览器控制台出现以下错误:TypeError: this.getAutoPrefixId is not a function
。堆栈跟踪的顶部如下:
init sap-ui-core.js line 175
init Component.js:19
constructor ManagedObject-dbg.js:444
constructor ManagedObject-dbg.js:463
constructor Component-dbg.js:244
第 init Component.js:19
行来自我的 Component.js
:UIComponent.prototype.init.apply(this, arguments);
请帮忙。
问候,列夫
问题是 init
函数是这样声明的:init => () {}
。将其转换为常规函数后(我的意思是 init: function (){}
)一切都变得很好。
我正在 OpenUI5+NodeJS 上编写一个小应用程序。当我调用 index.html
时,浏览器控制台出现以下错误:TypeError: this.getAutoPrefixId is not a function
。堆栈跟踪的顶部如下:
init sap-ui-core.js line 175
init Component.js:19
constructor ManagedObject-dbg.js:444
constructor ManagedObject-dbg.js:463
constructor Component-dbg.js:244
第 init Component.js:19
行来自我的 Component.js
:UIComponent.prototype.init.apply(this, arguments);
请帮忙。
问候,列夫
问题是 init
函数是这样声明的:init => () {}
。将其转换为常规函数后(我的意思是 init: function (){}
)一切都变得很好。