index.vue 550 B

12345678910111213141516171819202122232425
  1. <template>
  2. <template v-if="isLoading">
  3. <div class="init-loading">
  4. <a-spin tip="请稍等,加载中..." size="large" />
  5. </div>
  6. </template>
  7. <template v-else>
  8. <slot />
  9. </template>
  10. </template>
  11. <script lang="ts" setup>
  12. import { AppStore } from '@/store/modules/app';
  13. const store = AppStore();
  14. const isLoading = computed(() => {
  15. return store.isLoading;
  16. });
  17. </script>
  18. <style lang="less" scoped>
  19. .init-loading {
  20. height: 100%;
  21. display: flex;
  22. align-items: center;
  23. justify-content: center;
  24. }
  25. </style>