fix first day of week does not change when locale changed in sign up page

This commit is contained in:
MaysWind
2021-02-01 23:54:40 +08:00
parent bfdcb903fd
commit f94f556896
+5
View File
@@ -228,12 +228,17 @@ export default {
},
set: function (value) {
const isCurrencyDefault = this.user.defaultCurrency === this.$t('default.currency');
const isFirstWeekDayDefault = this.user.firstDayOfWeek === (this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')] ? this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')].type : 0);
this.$locale.setLanguage(value);
if (isCurrencyDefault) {
this.user.defaultCurrency = this.$t('default.currency');
}
if (isFirstWeekDayDefault) {
this.user.firstDayOfWeek = this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')] ? this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')].type : 0;
}
}
},
inputIsEmpty() {