Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
perf: do not reload page if not really change locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazyokd committed Apr 15, 2023
1 parent bf8ba58 commit f99412c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/components/ToolBar/ToolBarBottom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export default {
methods: {
handleCommand(lang) {
this.$i18n.locale = lang;
this.$router.go(0);
},
exitSystem() {
window.sessionStorage.removeItem("user");
Expand Down
1 change: 1 addition & 0 deletions src/mixins/i18nMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
currentLocale(newVal, oldVal) {
console.log(`Language changed from ${oldVal} to ${newVal}`);
localStorage.setItem("locale", newVal);
this.$router.go(0);
},
},
};

0 comments on commit f99412c

Please sign in to comment.