我已经直接将 sap.m.Table
与 OData 以及 JSON 一起使用。但显示 500 多个项目(例如 7 列)的最佳实践是什么?
我应该将 OData 加载到本地 JSON 模型中还是直接使用具有不断增长的功能(分页)的 OData?
[编辑版本+下面的研究]
根据 Improve this question 的API
... For mobile devices, the recommended limit of table rows is 100 (based on 4 columns) to assure proper performance. To improve initial rendering on large tables, use the growing feature
根据sap.m.Table的API
Provides a comprehensive set of features for displaying and dealing with vast amounts of data.
the Table control reuses its DOM elements of the rows. When the user scrolls, only the row contexts are changed but the rendered controls remain the same
那么无论如何,人们都必须使用不断增长的功能吗?
最佳答案
不建议对超过 100 个项目和大约 4 列使用 sap.m.Table
。否则可能会出现性能问题。对于大数据 sap.ui.table.Table
最适合。因此,超过 500 行和 7 列的 sap.ui.table.Table
是您的选择。最佳实践是直接使用 odata 模型。
关于javascript - SAPUI5中的最佳实践表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45696977/