Commit 4ed0c3cc by caoyanzhi

fix: 触达效果图表

parent 1324b2c4
......@@ -173,11 +173,14 @@ export default {
return dateArr;
},
formatterTime(val) {
let year = new Date(val).getFullYear();
let month = String(new Date(val).getMonth() + 1).padStart('2', '0');
let day = String(new Date(val).getDate()).padStart('2', '0');
let time = year + '-' + month + '-' + day;
return time;
const t = new Date(val);
let year = t.getFullYear();
let month = (t.getMonth() + 1).toString().padStart(2, '0');
let day = t
.getDate()
.toString()
.padStart(2, '0');
return `${year}-${month}-${day}`;
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment