<template>
    <div class="v-empty">
        <img :src="img" v-if="!hideImg">
        <p>
            <slot>暂无数据</slot>
        </p>
    </div>
</template>

<script>
import { getFileHost } from '@/assets/utils/host.js'
export default {
    props: {
        hideImg: { type: Boolean, default: false },
        img: { type: String, default: getFileHost('/Common/empty.png', 1) }
    }
}
</script>

<style lang="less" scoped>
.v-empty {
    text-align: center;
    padding: 100px 0 80px;
    color: #909399;
    img {
        width: 100px;
        height: 80px;
        margin-bottom: 10px;
    }
}
</style>
