<!--
 * @file: 空组件
 * @author: xueyanhui
 * @categories: 业务组件
 * @tags: [component]
-->
<template>
    <view class="empty">
        <Image :src="emptyImg" class="empty__img" />
        <text class-name="empty__text"> {{ emptyText }} </text>
    </view>
</template>

<script>
export default {
    config: {
        component: true
    },
    props: {
        /**
         * 空数据 展示的图片
         */
        emptyImg: {
            type: String,
            default: 'https://med-fe.cdn.bcebos.com/a-staff-at/empty.png'
        },
        /**
         * 文字
         */
        emptyText: {
            type: String,
            default: '系统异常，请稍后重新尝试'
        }
    }
};
</script>

<style lang="less" scoped>
.empty {
    &__img {
        width: 2.9rem;
        height: 2.3rem;
    }
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    height: 80vh;
    text-align: center;
    font-size: 0.15rem;
    color: #666;

    &__empty-text {
        display: inline-block;
        margin-top: 0.15rem;
    }
}
</style>
