feat(projects): new i18n function $t & login page and setting drawer config i18n

This commit is contained in:
Soybean
2023-07-23 20:19:47 +08:00
parent 458e387b68
commit 854d0bcf20
49 changed files with 1176 additions and 543 deletions

View File

@@ -15,7 +15,7 @@ import { localStg } from '@/utils';
const theme = useThemeStore();
const { locale } = useI18n();
const language = ref<I18nType.langType>(localStg.get('lang') || 'zh-CN');
const language = ref<I18nType.LangType>(localStg.get('lang') || 'zh-CN');
const options = [
{
label: '中文',
@@ -31,9 +31,9 @@ const options = [
}
];
const handleSelect = (key: string) => {
language.value = key as I18nType.langType;
language.value = key as I18nType.LangType;
locale.value = key;
localStg.set('lang', key as I18nType.langType);
localStg.set('lang', key as I18nType.LangType);
};
</script>
<style scoped></style>