moment获取未来10天日期
2021-11-09 本文已影响0人
轩辕夜空
getdate() {
this.datelist = [];
for (var i = 0; i < 10; i++) {
let data = {
date: moment().subtract(0 - i, "days").format("MM月DD日"),
}
this.datelist.push(data)
};
console.log(this.datelist);
},