我有一个使用 SAPUI5 的应用程序。我使用自己的 CSS 对结果进行了广泛的样式化,这极大地增强了应用程序的外观和可用性。
几周前,SAPUI5 库的新版本发布到
https://sapui5.hana.ondemand.com/resources/sap-ui-core.js
地址(还有 AU 和 US 服务器)。这个新版本改变了一些按钮的渲染。这破坏了我的一些 CSS。 (它还解决了很多其他问题,但不幸的是,损坏的 CSS 更为明显。)
在从 SAP 维护的库中请求时,有没有办法请求特定版本的 UI5? 或者是复制库并自己托管它的唯一解决方案(并引用中的托管版本我的申请?)
如果第二个选项是我唯一的真正选择,这似乎很不幸,因为这意味着我不会从其他已将 UI5 库加载到缓存中的应用程序中受益。考虑到加载 UI5 库需要多长时间,这真是太可惜了。
我还注意到 jQuery 本身非常清楚,您永远不应该在您的生产代码中引用他们的库的最新版本:
http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/
"So let’s be clear: Don’t use jquery-latest.js on a production site."
我认为 UI5 应该/可能也是如此 - 请告诉我是吗?或者如果这不是计划好的?
谢谢!
注意我在这里指的是在 HCP 服务器上维护的库 - https://sapui5.hana.ondemand.com , https://sapui5.ap1.hana.ondemand.com和 https://sapui5.us1.hana.ondemand.com不是任何本地维护的 SAP 服务器。
最佳答案
终于实现了:
https://help.hana.ondemand.com/help/frameset.htm?2d3eb2f322ea4a82983c1c62a33ec4ae.html
You can use SAPUI5 in any HTML page from SAP HANA Cloud Platform with the following bootstrap script:
<script id="sap-ui-bootstrap" type="text/javascript" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script>
If you want to make sure that you refer to a stable version of SAPUI5, you can use a versioned URL as in the example below:
<script id="sap-ui-bootstrap" type="text/javascript" src="https://sapui5.hana.ondemand.com/1.28.8/resources/sap-ui-core.js" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script>
The first segment of the URL after the host name is used to specify a concrete SAPUI5 version.
这是个好消息,最终意味着我可以停止将所有 UI5 库存储为元素的一部分,希望用户可以缓存它们。现在只是希望这些版本库在 CDN 上 :)
关于css - 请求/存储应用程序的特定 UI5 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25230061/