<template>
  <div
    class="upload-loading"
    v-loading="formLoading"
    :element-loading-text="loadingText || '表单上传中。。。'"
    element-loading-background="rgba(0,0,0, 0.2)"
  />
</template>

<script setup lang="ts">
  defineProps<{
    formLoading: boolean;
    loadingText?: string;
  }>();
</script>

<style lang="scss" scoped>
  .upload-loading {
    @include flex-center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
  }
</style>
