Blame view

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

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