1 2023/4/5格式
const today = new Date()
const todayDate = today.toLocaleDateString()
2 2023-4-5格式
const today = new Date()
const day = today.getDate()
const month = today.getMonth() + 1
const year = today.getFullYear()
const todayDate = `${year}-${month}-${day}`
console.log(todayDate)