根据出生日期换算年龄
getDate() {
// this.value = 2001-05-17 出生日期
var birthdays = new Date(this.value.replace(/-/g, "/"));
console.log(‘生日转换时间’,birthdays);
let d = new Date();
this.age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0);
console.log('年龄', this.age)
}