zdg #144

Merged
zhengdegang merged 24 commits from zdg into main 2024-08-16 13:42:41 +08:00
1 changed files with 9 additions and 3 deletions
Showing only changes of commit 2ed62802ce - Show all commits

View File

@ -263,9 +263,15 @@ export default {
getCurrentDate() { getCurrentDate() {
const now = new Date(); const now = new Date();
const year = now.getFullYear(); const year = now.getFullYear();
const month = now.getMonth() + 1; // 0+1 let month = now.getMonth() + 1; // 0+1
const day = now.getDate() let day = now.getDate()
return `${year}-${month.length == 2 ? month : '0' + month}-${day.length == 2 ? day : '0' + day}`; if(month < 10){
month = '0' + month
}
if(day < 10){
day = '0' + day
}
return `${year}-${month}-${day}`;
}, },
validateGrade(rule, value, callback) { validateGrade(rule, value, callback) {
if (this.studentList.length == 0) { if (this.studentList.length == 0) {