27 lines
609 B
Vue
27 lines
609 B
Vue
|
|
<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 { computed } from "vue";
|
||
|
|
import { useI18n } from "vue-i18n";
|
||
|
|
|
||
|
|
const { locale } = useI18n();
|
||
|
|
const antLocale = computed(() => (locale.value === "en-US" ? enUS : zhCN));
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<a-config-provider
|
||
|
|
:locale="antLocale"
|
||
|
|
:theme="{
|
||
|
|
token: {
|
||
|
|
colorPrimary: '#1677ff',
|
||
|
|
borderRadius: 6,
|
||
|
|
colorBgLayout: '#f0f2f5',
|
||
|
|
},
|
||
|
|
}"
|
||
|
|
>
|
||
|
|
<a-app class="app-root">
|
||
|
|
<router-view />
|
||
|
|
</a-app>
|
||
|
|
</a-config-provider>
|
||
|
|
</template>
|