时间戳好像是13位的纯数字。
如:1596297600000
我只需要年月日。
显示在elementui的日期组件那种格式
//时间戳转换方法 time:需要被转换的时间戳数字
formatDate(time) {
var date=new Date(parseInt(time));
var year=date.getFullYear();
var mon = date.getMonth()+1;
var day = date.getDate();
return year+'/'+mon+'/'+day;
},