ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

SAP Fiori Elements List Report 列表宽度决定逻辑的单步调试

2021-05-23 13:33:17  阅读:180  来源: 互联网

标签:Elements column List param mConfig width 宽度 rem 单步


注:本文需要结合这篇文章 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的原创文章,尽在:"汪子熙":

标签:Elements,column,List,param,mConfig,width,宽度,rem,单步
来源: https://www.cnblogs.com/sap-jerry/p/14800998.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有