Files
orion-visor/orion-visor-ui/src/App.vue

34 lines
842 B
Vue
Raw Normal View History

2023-07-24 10:05:07 +08:00
<template>
<a-config-provider :locale="locale">
2025-01-06 15:25:15 +08:00
<!-- 路由 -->
2023-07-24 10:05:07 +08:00
<router-view />
2025-01-06 15:25:15 +08:00
<!-- 应用设置 -->
2023-10-18 17:11:27 +08:00
<app-setting ref="appSettingRef" />
2023-07-24 10:05:07 +08:00
</a-config-provider>
</template>
<script lang="ts" setup>
2023-09-26 01:11:57 +08:00
import { computed, provide, ref } from 'vue';
2025-03-16 00:30:43 +08:00
import { openAppSettingKey } from '@/types/symbol';
import useLocale from '@/hooks/locale';
2023-07-24 10:05:07 +08:00
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
2023-10-18 17:11:27 +08:00
import AppSetting from '@/components/app/setting/index.vue';
2023-07-24 10:05:07 +08:00
const { currentLocale } = useLocale();
const locale = computed(() => {
switch (currentLocale.value) {
case 'zh-CN':
return zhCN;
default:
2023-07-27 18:48:15 +08:00
return zhCN;
2023-07-24 10:05:07 +08:00
}
});
2023-09-26 01:11:57 +08:00
// 对外暴露打开配置方法
2023-10-18 17:11:27 +08:00
const appSettingRef = ref();
provide(openAppSettingKey, () => {
appSettingRef.value.open();
2023-09-26 01:11:57 +08:00
});
2023-07-24 10:05:07 +08:00
</script>