MeterSphere/frontend/src/App.vue

29 lines
758 B
Vue

<template>
<a-config-provider :locale="locale">
<router-view />
<global-setting />
<ThemeBox />
</a-config-provider>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
import GlobalSetting from '@/components/global-setting/index.vue';
import useLocale from '@/locale/useLocale';
import ThemeBox from '@/components/theme-box/index.vue';
const { currentLocale } = useLocale();
const locale = computed(() => {
switch (currentLocale.value) {
case 'zh-CN':
return zhCN;
case 'en-US':
return enUS;
default:
return zhCN;
}
});
</script>