关于saprfc:SAP-UI5-complex-parser-只有在-126-版本之后才能使用

7次阅读

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

上面是一个例子:

语义是,complex Parser 性能,只能在 1.26 及其之后的版本应用:

if (config["bindingSyntax"] === "default" ) {config["bindingSyntax"] = (config.getCompatibilityVersion("sapCoreBindingSyntax").compareTo("1.26") < 0) ? "simple" : "complex";
            }

版本号是 1.26:

解析出主版本号为 1,次版本号为 26:

以后次版本号是 110:

以后 SAP UI5 版本的次版本号是怎么求进去的?

SAP UI5 默认的 jQuery 版本是 3.6.0,如果不是这个版本,在 console 会打印正告音讯。

Add all defined events to the event infrastructure

jQuery has inversed the order of event registration when multiple events are passed into jQuery.on method from version 1.9.1.

UIArea binds to both touchstart and saptouchstart event and saptouchstart internally also binds to touchstart event.

Before jQuery version 1.9.1, the touchstart event handler is called before the saptouchstart event handler and our flags (e.g. _sapui_handledByUIArea) still work. However since the order of event registration is inversed from jQuery version 1.9.1, the saptouchstart event handler is called before the touchstart one, our flags don’t work anymore.

Therefore jQuery version needs to be checked in order to decide the event order in ControlEvents.events.

将所有定义的事件增加到事件根底构造

从 1.9.1 版本开始,当多个事件被传递到 jQuery.on 办法时,jQuery 曾经颠倒了事件注册的程序。

UIArea 绑定到 touchstart 和 saptouchstart 事件,saptouchstart 在外部也绑定到 touchstart 事件。

在 jQuery 版本 1.9.1 之前,touchstart 事件处理程序在 saptouchstart 事件处理程序之前被调用,咱们的标记(例如 _sapui_handledByUIArea)依然无效。然而,因为事件注册的程序与 jQuery 1.9.1 版相同,saptouchstart 事件处理程序在 touchstart 事件处理程序之前被调用,咱们的标记不再起作用。

因而须要查看 jQuery 版本以确定 ControlEvents.events 中的事件程序。

这就是上图代码查看的用处所在。
默认的 compatVersion 值为 edge

默认的 SAP UI5 base version 为 1.14:

每个版本的 SAP UI5 SDK 文件,在 configuration.js 文件里硬编码了以后版本:

即在调试模式下 Technical Information Dialog 对话框里看到的:

正文完
 0