fix: remove flashing text on page reload (#1939)
This commit is contained in:
parent
13581323b0
commit
c71259334c
43 changed files with 88 additions and 61 deletions
|
@ -11,6 +11,9 @@ export default defineNuxtPlugin(async (nuxt) => {
|
|||
if (!supportLanguages.includes(lang))
|
||||
userSettings.value.language = getDefaultLanguage(supportLanguages)
|
||||
|
||||
if (lang !== i18n.locale)
|
||||
await setLocale(userSettings.value.language)
|
||||
|
||||
watch([$$(lang), isHydrated], () => {
|
||||
if (isHydrated.value && lang !== i18n.locale)
|
||||
setLocale(lang)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue