App.vue
993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
<AppProvider>
<router-view />
</AppProvider>
</ConfigProvider>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { ConfigProvider } from 'ant-design-vue';
import { initAppConfigStore } from '/@/logics/initAppConfig';
import { useLockPage } from '/@/hooks/web/useLockPage';
import { useLocale } from '/@/locales/useLocale';
import { AppProvider } from '/@/components/Application';
export default defineComponent({
name: 'App',
components: { ConfigProvider, AppProvider },
setup() {
// support Multi-language
const { antConfigLocale, setLocale } = useLocale();
setLocale();
// Initialize vuex internal system configuration
initAppConfigStore();
// Create a lock screen monitor
const lockEvent = useLockPage();
return {
antConfigLocale,
lockEvent,
};
},
});
</script>