the time in the table data given by the background is a 13-bit timestamp, which needs to be converted into time to be displayed in the table.
//
timestampToTime (cjsj) {
var date = new Date(cjsj) //10*1000131000
var Y = date.getFullYear() + "-"
var M = (date.getMonth()+1 < 10 ? "0"+(date.getMonth()+1) : date.getMonth()+1) + "-"
var D = date.getDate() + " "
var h = date.getHours() + ":"
var m = date.getMinutes() + ":"
var s = date.getSeconds()
return Y+M+D+h+m+s
console.log(timestampToTime (1533293827000))
},
tell me how to call this method in the table in < template >. I didn"t get the time when I called it.
uses the table component < el-table-column > in the element-ui framework, where is the name of the field bound on prop. How to convert this timestamp and bind it to the table