From f94f5568968ed7d1080c83a697c9f2ecb7f38392 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 1 Feb 2021 23:54:40 +0800 Subject: [PATCH] fix first day of week does not change when locale changed in sign up page --- src/views/mobile/Signup.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/mobile/Signup.vue b/src/views/mobile/Signup.vue index 278c5a44..8f7abbf6 100644 --- a/src/views/mobile/Signup.vue +++ b/src/views/mobile/Signup.vue @@ -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() {