关于javascript:关于-SAP-UI5-getSAPLogonLanguage-的错误消息以及-API-版本的讨论

7次阅读

共计 1647 个字符,预计需要花费 5 分钟才能阅读完成。

题目:对于 SAP UI5 this.language._getSAPLogonLanguage is not a function 的谬误音讯

这个谬误在应用最新的 SAP UI5 SDK 并且切换到调试模式时会呈现,但不是总可能重现。

Uncaught ModuleError: failed to execute module factory for ”sap/ui/core/Core.js”: this.language._getSAPLogonLanguage is not a function

at makeModuleError (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1044:15)
at Module.failWith (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:816:13)
at https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1832:33
at requireAll (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1747:12)
at executeModuleDefinition (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1798:3)
at Object.ui5Define [as define] (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1931:3)
at eval (https://sapui5.hana.ondemand.com/resources/sap/ui/core/Core-dbg.js?eval:8:8)
at eval (<anonymous>)
at execModule (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1647:15)
at requireModule (https://sapui5.hana.ondemand.com/resources/sap-ui-core-dbg.js:1548:5)

在调试模式下:

不能稳固重现:

通过 JavaScript 操作 HTML/CSS 是可能的,比方上面的代码:

className = "someCSSClass";

或者间接通过 CSS,例如。然而要留神:SAPUI5 生成的 HTML 和 CSS 不是公共 API 的一部分,可能会在补丁和小版本中发生变化

如果决定重写款式,则须要在 SAPUI5 每次更新时测试和更新批改。这样做的先决条件是开发人员能够管制 SAPUI5 的版本,例如,在独立场景中应用的版本。当在 SAP Fiori 启动台上运行你的应用程序时,开发人员不可能有 SAP UI5 版本的控制权,SAPUI5 是集中加载所有应用程序。因而,SAP Fiori 的启动平台应用程序不应该笼罩款式。

永远不要应用或笼罩不属于 API 援用的 公有 函数。公有函数通常 (但并不总是) 以一个“_”作为前缀。

除非另有阐明,SAP UI5 官网中的 API 指的是 公共 API,即函数、类、名称空间、控件及其申明的属性、聚合等。公共 API 的惟一定义是 API 参考,它蕴含在 SAPUI5 演示套件中。没有提到的个性不是 API 的一部分。

以下规定实用于引入新的 api 或对现有 api 进行不兼容的更改:

  • 次要版本(x.y .zz): 新的次要版本能够引入新的 api 或对现有 api 进行不兼容的更改。
  • 主要版本(x.y .zz): 新的主要版本能够引入新的 api,但不能蕴含对任何 api 的不兼容更改。
  • 补丁版本(x.y .zz): 新的补丁版本只蕴含对现有实现的修复,但通常不蕴含新个性或不兼容的 API 更改。
正文完
 0