Blame view

src/App.vue 954 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';
13
  import { initAppConfigStore } from '/@/setup/App';
vben authored
14
vben authored
15
16
  import { useLockPage } from '/@/hooks/web/useLockPage';
  import { useLocale } from '/@/hooks/web/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() {
vben authored
24
25
26
27
28
      // Initialize vuex internal system configuration
      initAppConfigStore();

      // Create a lock screen monitor
      const lockEvent = useLockPage();
vben authored
29
vben authored
30
31
32
      // support Multi-language
      const { antConfigLocale } = useLocale();
陈文彬 authored
33
      return {
vben authored
34
        antConfigLocale,
vben authored
35
        lockEvent,
陈文彬 authored
36
37
38
39
      };
    },
  });
</script>