vue时间格式与时间戳转换
文章目录
HTML部分
<template slot-scope="scope">
{{dateFormat(scope.row.invoiceDate)}}
</template>
JS部分
dateFormat:function(timestamp){
if(timestamp && timestamp !="")
{
let dateStr = new Date(timestamp).Format("yyyy-MM-dd hh:mm:ss");
return dateStr;
}
return "-";
},
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论