fix: 处理 i18n 报错和 props 报错

This commit is contained in:
奔跑的面条
2023-01-08 19:10:41 +08:00
parent 4e091c7f49
commit 7b262c9db2
9 changed files with 43 additions and 26 deletions
+3
View File
@@ -14,16 +14,19 @@
</template>
<script lang="ts" setup>
import { useI18n } from "vue-i18n";
import { useLangStore } from '@/store/modules/langStore/langStore'
import { langList } from '@/i18n/index'
import { LangEnum } from '@/enums/styleEnum'
import { icon } from '@/plugins'
const { LanguageIcon } = icon.ionicons5
const { locale } = useI18n();
const langStore = useLangStore()
const options = langList
const handleSelect = (key: LangEnum) => {
locale.value = key;
langStore.changeLang(key)
}
</script>