[lazy load lang] load the language file on create

This commit is contained in:
Louis Lam 2021-11-29 16:45:52 +08:00
parent 50593f3edf
commit c50b2b636a
1 changed files with 6 additions and 0 deletions

View File

@ -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);