App.vue 991 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
  3. <AppProvider>
  4. <router-view />
  5. </AppProvider>
  6. </ConfigProvider>
  7. </template>
  8. <script lang="ts">
  9. import { defineComponent } from 'vue';
  10. import { ConfigProvider } from 'ant-design-vue';
  11. import { AppProvider } from '/@/components/Application';
  12. import { initAppConfigStore } from '/@/logics/initAppConfig';
  13. import { useLockPage } from '/@/hooks/web/useLockPage';
  14. import { useLocale } from '/@/locales/useLocale';
  15. export default defineComponent({
  16. name: 'App',
  17. components: { ConfigProvider, AppProvider },
  18. setup() {
  19. // support Multi-language
  20. const { antConfigLocale, setLocale } = useLocale();
  21. setLocale();
  22. // Initialize vuex internal system configuration
  23. initAppConfigStore();
  24. // Create a lock screen monitor
  25. const lockEvent = useLockPage();
  26. return {
  27. antConfigLocale,
  28. lockEvent,
  29. };
  30. },
  31. });
  32. </script>