首先在方法里声明时间接收
addDate() {
nowDate = new Date();
let date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
date: nowDate.getDate(),
}
console.log(date);
let systemDate = date.year + '-' + 0 + date.month + '-' + 0 + date.date;
}
所有评论(0)