从丁哥那里学到的两个UI5技巧

简介: 栏sapui5.runtime\src\framework_core\target\classes\META-INF\resources\sap-ui-core.jsLine 14925 -
                /**
                * Determine whether to use debug sources depending on URL parameter and local storage
                * and load debug library if necessary
                */
```JavaScript
                (function() {
                                //Check URI param
                                var bDebugSources = /sap-ui-debug=(true|x|X)/.test(location.search),
                                                bIsOptimized = window["sap-ui-optimized"];
                                //Check local storage
                                try { //Necessary for FF when Cookies are deactivated
                                                bDebugSources = bDebugSources || (window.localStorage.getItem("sap-ui-debug") == "X");
                                } catch (e) {}
                                window["sap-ui-debug"] = bDebugSources;
                                // if bootstap URL already contains -dbg URL, just set sap-ui-loaddbg
                                if (/-dbg\.js([?#]|$)/.test(_oBootstrap.url)) {
                                                window["sap-ui-loaddbg"] = true;
                                                window["sap-ui-debug"] = true;
                                }
                                // if current sources are optimized and debug sources are wanted, restart with debug URL
                                if (bIsOptimized && bDebugSources) {
                                                var sDebugUrl = _oBootstrap.url.replace(/\/(?:sap-ui-cachebuster\/)?([^\/]+)\.js/, "/$1-dbg.js");
                                                window["sap-ui-optimized"] = false;
                                                window["sap-ui-loaddbg"] = true;
                                                document.write("<script type=\"text/javascript\" src=\"" + sDebugUrl + "\"></script>");
                                                var oRestart = new Error("Aborting UI5 bootstrap and restarting from: " + sDebugUrl);
                                                oRestart.name = "Restart";
                                                throw oRestart;
                                }
                })();

Sap-ui-core.js is merged from sapui5.runtime\src\framework_core\target\classes\META-INF\maven\com.sap.openui5\sap.ui.core\pom.xml

<echo>Merging module: sap-ui-core.js</echo>
                concat destfile="${project.build.outputDirectory}/META-INF/resources/sap-ui-core.js" overwrite="true" encoding="UTF-8" eol="lf" fixlastline="true">
                                                                                                                                                <filelist dir="${project.build.outputDirectory}/META-INF/resources/">
                                                                                                                                                                <file name="sap/ui/thirdparty/jquery/jquery-1.11.1.js"/>
                                                                                                                                                                <file name="sap/ui/thirdparty/jqueryui/jquery-ui-position.js"/>
                                                                                                                                                                <file name="sap/ui/Device.js"/>
                                                                                                                                                                <file name="sap/ui/thirdparty/URI.js"/>
                                                                                                                                                                <file name="jquery.sap.promise.js"/>
                                                                                                                                                                <file name="jquery.sap.global.js"/>
                                                                                                                                                </filelist>
                                                                                                                                </concat>
相关文章
从丁哥那里学到的两个 SAP UI5 技能
从丁哥那里学到的两个 SAP UI5 技能
从丁哥那里学到的两个 SAP UI5 技能
sapui5.runtime\src\framework_core\target\classes\META-INF\resources\sap-ui-core.js Line 14925 -&gt;
|
2月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
|
2月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
|
2月前
|
前端开发 JavaScript API
SAP UI5 sap.ui.require.toUrl 的作用介绍
SAP UI5 sap.ui.require.toUrl 的作用介绍
|
2月前
|
JSON 前端开发 测试技术
SAP UI5 sap.ui.core.util.MockServer.simulate 方法介绍
SAP UI5 sap.ui.core.util.MockServer.simulate 方法介绍
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
|
2月前
|
缓存 JavaScript 前端开发
如何理解 SAP UI5 的 sap.ui.define 函数?
如何理解 SAP UI5 的 sap.ui.define 函数?
|
2月前
|
监控 测试技术
SAP 电商云修改 Product Catalog Staged 版本数据后,同步到 online 版本的 UI 操作
SAP 电商云修改 Product Catalog Staged 版本数据后,同步到 online 版本的 UI 操作
什么是 SAP ABAP 里的 Subscreen
什么是 SAP ABAP 里的 Subscreen
什么是 SAP ABAP 里的 Subscreen