<template>
    <div class="dialogTable">
        <el-dialog :visible.sync="visible" :width="width" :title="title" :before-close="() => $emit('close')">
            <el-row type="flex" justify="space-between" align="middle">
                <el-col>
                    <slot name="btns"></slot>
                </el-col>
                <slot name="tip"></slot>
            </el-row>
            <el-row style="margin-top: 5px">
                <slot name="table"></slot>
            </el-row>
            <el-row style="margin-top: 5px" type="flex" justify="end">
                <slot name="pagination"></slot>
            </el-row>
        </el-dialog>
    </div>
</template>

<script>
export default {
    props: {
        title: {
            type: String,
            require: true
        },
        visible: {
            type: Boolean,
            require: true
        },
        width: {
            type: String,
            default: '50%'
        }
    },
    data() {
        return {

        }
    }
}
</script>