<template>
  <div class="layout-content">
    <RouterView v-if="!loading" />
    <div v-else class="loading" v-loading="loading" />
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { getAllDictDataFun, getUserPermissionsFun } from '@/utils/common';

const loading = ref(true);

onMounted(async () => {
  await getAllDictDataFun();
  getUserPermissionsFun();
  loading.value = false;
});
</script>

<style lang="scss" scoped>
.layout-content {
  width: 100%;
  height: 100%;
}
.loading {
  width: 100%;
  height: 100%;
}
</style>
