index.vue 564 Bytes
<script setup lang="ts">
withDefaults(defineProps<{ hasCard?: boolean; hasBread?: boolean; loading?: boolean }>(), {
  loading: false,
});
</script>

<template>
  <div class="container">
    <breadcrumb v-if="hasBread && $route.meta?.breadcrumb" :items="$route.meta?.breadcrumb" />
    <a-spin style="width: 100%" :loading="loading as boolean">
      <a-card v-if="hasCard" :bordered="false">
        <slot />
      </a-card>
      <slot v-else />
    </a-spin>
  </div>
</template>

<style scoped lang="less">
.container {
  padding: 0 30px 20px 20px;
}
</style>