getage() { var birthdays = new Date(this.birthday.replace(/-/g, "/")); var d = new Date(); var age = d.getFullYear() - birthdays.getFullYear() - (d.getMonth() < birthdays.getMonth() || (d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate()) ? 1 : 0); this.userAge = age; },
所有评论(0)