优化,完善代码
This commit is contained in:
@@ -85,7 +85,7 @@ export default {
|
||||
open(val) {
|
||||
this.visible = true;
|
||||
const currentYear = new Date().getFullYear();
|
||||
this.years = Array.from({ length: currentYear - 1980 + 1 }, (_, i) => 1980 + i);
|
||||
this.years = Array.from({ length: currentYear - 1980 + 11 }, (_, i) => 1980 + i);
|
||||
const date = val ? new Date(val) : new Date();
|
||||
const y = date.getFullYear();
|
||||
const m = date.getMonth() + 1;
|
||||
|
||||
Reference in New Issue
Block a user