直接上代码了:
/*** * @param e 转换成标准的年月日进行拆分* @returns */changeCreationtime(e:any) {let year = e.getFullYear(),month = (e.getMonth() + 1) > 9 ? (e.getMonth() + 1) : '0' + (e.getMonth() + 1),day = e.getDate() > 9 ? e.getDate() : '0' + e.getDate();let obj = {year,month,day}return obj
}