Blame view

src/App.vue 993 Bytes
陈文彬 authored
1
<template>
2
  <ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
vben authored
3
4
5
    <AppProvider>
      <router-view />
    </AppProvider>
陈文彬 authored
6
7
8
9
10
11
12
  </ConfigProvider>
</template>

<script lang="ts">
  import { defineComponent } from 'vue';
  import { ConfigProvider } from 'ant-design-vue';
vben authored
13
  import { initAppConfigStore } from '/@/logics/initAppConfig';
vben authored
14
vben authored
15
  import { useLockPage } from '/@/hooks/web/useLockPage';
vben authored
16
  import { useLocale } from '/@/locales/useLocale';
17
vben authored
18
19
  import { AppProvider } from '/@/components/Application';
陈文彬 authored
20
  export default defineComponent({
21
    name: 'App',
vben authored
22
    components: { ConfigProvider, AppProvider },
陈文彬 authored
23
    setup() {
24
      // support Multi-language
vben authored
25
26
27
      const { antConfigLocale, setLocale } = useLocale();
      setLocale();
vben authored
28
29
30
31
32
      // Initialize vuex internal system configuration
      initAppConfigStore();

      // Create a lock screen monitor
      const lockEvent = useLockPage();
vben authored
33
陈文彬 authored
34
      return {
vben authored
35
        antConfigLocale,
vben authored
36
        lockEvent,
陈文彬 authored
37
38
39
40
      };
    },
  });
</script>