<el-table-column prop="modifyTime" label="修改时间">
</el-table-column>想用下面自定义的过滤器 该怎么写//自定义过滤器过滤时间 作用:将1415674835697的时间戳转为 yyyy/MM/dd 格式时间Vue.filter("timeForm",function(time){ time =(typeof time=='string')?parseInt(time) : time
let date=new Date(time) return util.formateDate(date,'yyyy/MM/dd');
});
2 回答
隔江千里
TA贡献1906条经验 获得超10个赞
<el-table-column prop="createDate" label="创建时间">
<template slot-scope="scope">
{{scope.row.createDate|timeForm}}
</template>
</el-table-column>- 2 回答
- 0 关注
- 4695 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消
