From c50b2b636ae84863272f9e86cd1bc58b71777832 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 29 Nov 2021 16:45:52 +0800 Subject: [PATCH] [lazy load lang] load the language file on create --- src/mixins/lang.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mixins/lang.js b/src/mixins/lang.js index 2a13fec28..31d5a8e0b 100644 --- a/src/mixins/lang.js +++ b/src/mixins/lang.js @@ -9,6 +9,12 @@ export default { }; }, + async created() { + if (this.language !== "en") { + await this.changeLang(this.language); + } + }, + watch: { async language(lang) { await this.changeLang(lang);