Browse Source

fix: reverse year options

Signed-off-by: Carlos <568187512@qq.com>
Carlos 6 days ago
parent
commit
03cf388072

+ 1 - 1
src/app/pages/datav/digital-line/right-panel/right-panel.component.ts

@@ -89,7 +89,7 @@ export class RightPanelComponent {
     this.yearOptions = Array.from({ length: isInit ? date.getFullYear() - 2023 : 1 }, (_, i) => ({
       label: `${date.getFullYear() - i}年`,
       value: date.getFullYear() - i,
-    }));
+    })).reverse();
     this.year = this.yearOptions[this.yearOptions.length - 1].value;
     this.month = date.getMonth() + 1;
   }