Skip to content

Commit

Permalink
fix: 修复每次进入都会自动切换回浏览器语言的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
typed-sigterm committed Aug 2, 2024
1 parent 03a4011 commit 33ca0e3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ import { promiseTimeout } from '@vueuse/core';
import { enUS, zhCN } from 'naive-ui';
const i18n = useI18n();
watchImmediate(usePreferredLanguages(), (langs) => {
for (const lang of langs) {
if (i18n.availableLocales.includes(lang)) {
switchLanguage(i18n, lang);
return;
}
}
switchLanguage(i18n, 'en');
});
if (__APP__)
await useThemeStore().init(); // 异步初始化主题
Expand Down

0 comments on commit 33ca0e3

Please sign in to comment.