filters: { toChangeDate(e) { console.log(new Date(e).getFullYear()) console.log(new Date(e).getMonth()) console.log(new Date(e).getDay()) let dateYear = new Date(e).getFullYear(); //获取年 let dateMonth = new Date(e).getMonth()+1<10? '0' + new Date(e).getMonth() : new Date(e).getMonth(); //获取月 let dateDate = new Date(e).getDate()<10?'0' + new Date(e).getDate() : new Date(e).getDate(); //获取当日 return dateYear + '-' + dateMonth + '-' + dateDate } },