- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 SAPUI5 中,当您第一次将 sap.m.DatePicker
添加到您的应用程序时,需要几秒钟时间来加载所需的文件并打开日期选择器。在API他们解释说:
Note: The sap.ui.unified.Calendar is used internally only if the DatePicker is opened (not used for the initial rendering). If the sap.ui.unified library is not loaded before the DatePicker is opened, it will be loaded upon opening. This could lead to a waiting time when the DatePicker is opened for the first time. To prevent this, apps using the DatePicker should also load the sap.ui.unified library.
所以这就是他们建议的使 DatePicker 加载速度更快的解决方案。
当我使用 sap.ui.comp.smarttable.SmartTable
时,用户第一次看到该应用至少需要 10 到 15 秒。
实际上它会加载大量单独的 JavaScript 文件。这是加载的文件的一小部分。
现在的问题是,有什么办法可以加快加载速度吗?
我在 list 的 dependencies
中尝试了以下代码,但没有帮助。
"sap.ui.comp": {
"minVersion": "1.52.1"
}
最佳答案
SmartTable 是一个巨大的控件,它依赖于以下库:
“sap.ui.core”
“sap.m”
“sap.ui.comp”
“sap.ui.table”
其中,again, depends on ..“sap.ui.unified”
这可以在 dependency list of the module 中看到.
尝试预先异步预加载这些库:
如果您可以控制 Bootstrap 配置,请添加 data-sap-ui-async="true"
(或 data-sap-ui-preload="async"
如果 UI5 版本 < 1.58.2)。
并且在 app descriptor (manifest.json
) ,声明依赖库和启用preloading remote model data :
{
...
"sap.ui5": {
"dependencies": {
<strong>"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.comp": {},
"sap.ui.table": {},
"sap.ui.unified": {}
},</strong>
},
"models": {
"myODataModel": {
<strong>"preload": true,</strong>
...
这应该会更快地加载表,因为它的依赖项不再需要按需同步加载,从而避免卡住浏览器的 UI 线程。
并且通过 preload: true
,可以更早地请求 SmartTable 所依赖的服务 $metadata
文档和注释。
有关其他性能相关的最佳实践,请参阅 Performance Checklist .
关于sapui5 - 如何更快地加载 sap.ui.comp.smarttable.SmartTable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49817459/
在 SAPUI5 中,当您第一次将 sap.m.DatePicker 添加到您的应用程序时,需要几秒钟时间来加载所需的文件并打开日期选择器。在API他们解释说: Note: The sap.ui.un
有没有办法在 AngularJS 智能表中的行选择上触发事件? 这是其他线程中的主题,但仍然没有答案。 Unable to select the grid item using SmartTable
我们已经实现了 SmartTable,一切正常。我只想删除 SmartTable useTablePersonalisation 选项提供的 Filter 选项。 这可能吗? 问候,马亚克 最佳答案
我正在使用 angularJS 和智能表格框架在 html 中管理我的表格: 可以使用 SmartTable 属性选择表格行:st-select-row="row"。 在用户选择行并单击“添加”按钮后
我目前正在尝试使用我们的 MII 服务器中的 OData 填充智能表(xml View )。我不断收到以下错误: 错误:无法从 ./Component-changes.json 加载资源 PATH/C
我是一名优秀的程序员,十分优秀!