解决方案: 提示:将时间中的 - 替换为 / formatYear (year) { let date = new Date(year.replace(/-/g, '/')) return formatYear(date) }