<template>
    <div class="progress-container" @touchstart.stop.prevent="">
        <div class="progress">
            <progressbar color="#FFFFFF"></progressbar>
            <div class="msg">{{message}}</div>
        </div>
    </div>
</template>
<script>
import progressbar from './progressbar'
export default {
    name: 'progress-dialog',
    props: {
        message: {
            type: String,
            default() {
                return '正在加载'
            }
        }
    },
    components: {
        progressbar
    }
}

</script>
<style scoped>
.progress-container {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1200;
}

.progress {
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0.2rem;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 1.6rem;
    margin: auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.img-p {
    width: 0.6rem;
    height: 0.6rem;
    animation: spin 1s infinite linear;
    -webkit-animation: spin 1s infinite linear;
}

.msg {
    color: #fff;
    font-size: 0.28rem;
    margin-top: 0.24rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
</style>
