快速获取当前年月日,随笔
getCurrentDate() {
let date = new Date()
let year = date.getFullYear()
let month = String(date.getMonth() + 1).padStart(2, '0') // 月份从0开始,需要加1,并补零
let day = String(date.getDate()).padStart(2, '0') // 补零
return `${year}-${month}-${day}`
},
浙公网安备 33010602011771号