【发布时间】:2020-12-22 11:34:08
【问题描述】:
我只需要使用小时和分钟部分。如何在没有:ss的情况下使用“时间”JSON类型?
"time" data type usage example which is referred from above document page.
【问题讨论】:
我只需要使用小时和分钟部分。如何在没有:ss的情况下使用“时间”JSON类型?
"time" data type usage example which is referred from above document page.
【问题讨论】:
我们使用customCell方法解决了这个问题,
function customizeCellFunction(cellBuilder, cellData){
if(cellData &&
cellData.hierarchy &&
cellData.hierarchy.uniqueName==="Duration"
){
cellBuilder.text = cellBuilder.text.slice(0,-3) // HH:MM:ss => HH:MM
}
}
Codepen 链接:https://codepen.io/AKCAK/pen/KKgXVwp?editors=0010
【讨论】: