vben
2021-02-22 be3a3ed699f73d352d49623ef07288093a3332c4
提交 | 用户 | age
2f6253 1 <template>
116a1f 2   <ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
74e62c 3     <AppProvider>
4d7001 4       <RouterView />
74e62c 5     </AppProvider>
2f6253 6   </ConfigProvider>
7 </template>
8
9 <script lang="ts">
10   import { defineComponent } from 'vue';
11   import { ConfigProvider } from 'ant-design-vue';
581007 12   import { AppProvider } from '/@/components/Application';
2f6253 13
eba557 14   import { initAppConfigStore } from '/@/logics/initAppConfig';
70fba7 15
737b1b 16   import { useLockPage } from '/@/hooks/web/useLockPage';
99ac30 17   import { useLocale } from '/@/locales/useLocale';
74e62c 18
2f6253 19   export default defineComponent({
34c09f 20     name: 'App',
74e62c 21     components: { ConfigProvider, AppProvider },
2f6253 22     setup() {
ca4f1a 23       // support Multi-language
99ac30 24       const { antConfigLocale, setLocale } = useLocale();
be3a3e 25
99ac30 26       setLocale();
V 27
46e087 28       // Initialize vuex internal system configuration
V 29       initAppConfigStore();
be3a3e 30
46e087 31       // Create a lock screen monitor
V 32       const lockEvent = useLockPage();
737b1b 33
2f6253 34       return {
737b1b 35         antConfigLocale,
46e087 36         lockEvent,
2f6253 37       };
38     },
39   });
40 </script>