add internationalization / dynamic themes

This commit is contained in:
landaiqing
2024-08-09 19:51:56 +08:00
parent c13613ec07
commit 438965f2a2
28 changed files with 402 additions and 391 deletions

View File

@@ -0,0 +1,23 @@
<template>
<AConfigProvider
:locale="lang.getLang() === 'en' ? enUS : zhCN"
:theme="app.themeConfig"
>
<router-view v-slot="{ Component, route }">
<transition name="animation" mode="out-in">
<component :is="Component" :key="route.path"/>
</transition>
</router-view>
</AConfigProvider>
</template>
<script setup lang="ts">
import enUS from 'ant-design-vue/es/locale/en_US';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import useStore from "@/store/index.ts";
const app = useStore().theme;
const lang = useStore().lang;
</script>
<style scoped lang="scss">
</style>