Ver Fonte

Merge pull request #20758 from iamkun/fix/calendar-i18n

fix: fix calendar component i18n bug
好多大米 há 4 anos atrás
pai
commit
20c7cc9c50
1 ficheiros alterados com 3 adições e 6 exclusões
  1. 3 6
      packages/calendar/src/date-table.vue

+ 3 - 6
packages/calendar/src/date-table.vue

@@ -20,12 +20,6 @@ export default {
 
   inject: ['elCalendar'],
 
-  data() {
-    return {
-      WEEK_DAYS: getI18nSettings().dayNames
-    };
-  },
-
   methods: {
     toNestedArr(days) {
       return rangeArr(days.length / 7).map((_, index) => {
@@ -83,6 +77,9 @@ export default {
   },
 
   computed: {
+    WEEK_DAYS() {
+      return getI18nSettings().dayNames;
+    },
     prevMonthDatePrefix() {
       const temp = new Date(this.date.getTime());
       temp.setDate(0);