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 Fiori Elements List Report 列表宽度决定逻辑的单步调试的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 消息称三星 Galaxy S23 FE
- 下一篇: SAP CRM 和 SAP Cloud