若依Ruoyi项目前端js时间格式化工具写法

前端使用$.common.dateFormat方法格式化日期,格式yyyy-MM-dd HH:mm:ss,代码如下:

{
field: 'createTime',
title: '时间',
formatter: function(value, row, index) {
  return $.common.dateFormat(value, "yyyy-MM-dd HH-mm-ss");
}
}

 

正在加载评论...