Blame view

src/App.vue 1003 Bytes
陈文彬 authored
1
<template>
2
  <ConfigProvider v-bind="lockEvent" :locale="getAntdLocale">
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 { useTitle } from '/@/hooks/web/useTitle';
vben authored
18
  import { useLocale } from '/@/locales/useLocale';
19
陈文彬 authored
20
  export default defineComponent({
21
    name: 'App',
vben authored
22
    components: { ConfigProvider, AppProvider },
陈文彬 authored
23
    setup() {
vben authored
24
25
      // Initialize vuex internal system configuration
      initAppConfigStore();
vben authored
26
Vben authored
27
28
29
30
31
      useTitle();

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