SAP Fiori Elements List Report 列表宽度决定逻辑的单步调试
注:本文需要结合这篇文章 SAP Fiori Elements List Report Smart Table 列项目宽度计算的奥妙 来阅读。
执行上下文:SmartTable.prototype._onMetadataInitialised
当前 SmartTable 的所有属性:
总共从 model 里取出了 36 个字段:
其中 lineItem 即列项目备选项有 6 个:
支持导出成 excel:
遍历每一个字段:
这三个字段默认 visible:
这个宽度是什么时候计算出来的?
关于 importance 的计算:
宽度的自动计算:
return oColumn.setWidth(this._calcColumnWidth(oField) + “rem”);
Calculates the column width from the metadata attributes.
基于元数据里的属性计算宽度。
The optimal column width is calculated with creating the longest possible sample of the created model type.
最优的宽度是基于字段类型最大可能的长度
Afterwards it is formatted to string while taking the constraints and format options into account, and then measured over canvas.
计算完毕后,被转换成字符串格式
参数1:@param {object} oField OData metadata for the table field
字段在 OData 元数据中的属性
参数2:@param {boolean} [bAdditionalProperty=false] Whether the calcuation of additional or leading property
计算时是否需要考虑额外的属性
参数3:@param {object} [mConfig] The configuration object
参数4:@param {int} [mConfig.min=2] The minimum content width of the column in rem
列的最小宽度,单位为 rem
参数5:@param {int} [mConfig.max=19] The maximum content width of the column in rem
列的最大宽度,单位为 rem
@param {boolean} [mConfig.label=true] Whether the column label should be taken into account as minimum column width or not
列的最小宽度是否应该将列标签考虑在内
语义:计算 w 重复出现 40 次,在当前浏览器环境下,渲染出来需要的宽度。
更多Jerry的原创文章,尽在:“汪子熙”:
相关文章
- SAP UI5 XML 视图中数据绑定路径语法的难点和易混淆点的专题讲解
- SAP UI5 应用开发教程之九十 - 基于 OData V2 的 SAP UI5 List-Detail(列表-明细)布局的实现方式试读版
- 如何使用 controllerExtensions 给 SAP Fiori Elements List Report 的表格注册事件响应函数
- 如何从 SAP Fiori Elements List Report Table 点击事件响应函数里拿到表格某一行的信息
- 如何查看 SAP Fiori Elements List Report Table 都支持哪些设置
- SAP WebIDE 是如何加载SAP UI5里自定义的XML view的 - JerryMaster.view.xml
- SAP Fiori Elements里Drop down list的实现原理
- SAP UI5 Gateway后台ETAG校验逻辑
- SAP UI5 Drop down list value changed
- why I cannot set SAP UI5 dropdown list as not selected
- 几种 SAP ABAP OData 服务的性能评估和测试工具介绍试读版
- SAP CRM Application Extension Tool类型为Code List的扩展字段实现原理
- SAP 电商云 Spartacus Maintenance branch
- SAP Spartacus 服务器端渲染调试的开发端版本
- SAP Spartacus List Component 里定义的待显示 Popover 内容,如何传递到 Popover Component 里的?
- SAP Spartacus B2B User list页面的数据加载逻辑
- SAP Spartacus里unit list tree节点expanded属性的赋值逻辑
- SAP Spartacus Unit List Component的设计明细 - UnitListComponent
- SAP Spartacus Unit List树形数据的加载
- SAP Spartacus org unit list和unit detail的分屏显示原理
- SAP Spartacus Org Unit List响应回车案件的实现原理
- SAP Spartacus全局配置里和路由Route相关的配置
- SAP Spartacus My Company list focus事件触发后,控件border的默认效果
- 如何创建SAP C4C Product list并用OData服务消费
- SAP CRM和C4C message category配置
- 如何通过Restful API的方式读取SAP Commerce Cloud的Product Reference
- SAP CRM schedule line i
- 如何处理SAP云平台错误消息 there is no compute unit quota for subaccount
- 关于 SAP UI5 OData V4 模型的类型自动识别
- SAP UI5 应用开发教程之六十七 - 基于 OData V4 的 SAP UI5 List-Detail(列表-明细)布局的实现方式试读版
- SAP Commerce Cloud SmartEdit 学习笔记