lyc-dev #135

Merged
lyc merged 2 commits from lyc-dev into main 2024-08-15 10:32:17 +08:00
1 changed files with 9 additions and 3 deletions
Showing only changes of commit 6e8c96ce2e - Show all commits

View File

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