getdate() {
this.datelist = [];
for (var i = 0; i < 5; i++) {
let data = {
date: moment().subtract(0 - i, "days").format("MM月DD日"),
}
this.datelist.push(data)
};
console.log(this.datelist);
},
//执行结果
[{
"date": "04月06日"
}, {
"date": "04月07日"
}, {
"date": "04月08日"
}, {
"date": "04月09日"
}, {
"date": "04月10日"
}]