fix(02): resolve 3 typecheck errors and i18n langDir path
- useSetLocale → destructured setLocale from useI18n() - addSeoAttributes → seo option for useLocaleHead() - process.env → import.meta.env for Nuxt compatibility - langDir: 'locales/' → 'app/locales/' (Nuxt 4 resolves from project root)
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
const { locale } = useI18n()
|
||||
const head = useLocaleHead({ addSeoAttributes: true })
|
||||
const head = useLocaleHead({ seo: true })
|
||||
|
||||
useHead({
|
||||
htmlAttrs: { lang: locale },
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
const { t, locale } = useI18n()
|
||||
const { t, locale, setLocale } = useI18n()
|
||||
const localePath = useLocalePath()
|
||||
const setLocale = useSetLocale()
|
||||
const colorMode = useColorMode()
|
||||
const route = useRoute()
|
||||
const drawerOpen = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user