<template>
    <div>
        <el-popconfirm confirm-button-text='确认' cancel-button-text='取消' icon="el-icon-info" icon-color="red"
            title="确认删除当前数据？" @confirm="deleteRow(rowIndex)">
            <el-button  slot="reference" type="text" size="small" class="delete-button">
                删除
            </el-button>
        </el-popconfirm>
    </div>
</template>

<script>
export default {
    name: "TableOpertaionDelete",
    props: {
        row: {
            type: Object,
            default: () => { },
        },
        rowIndex: {
            type: Number,
            default: 0,
        }
    },
    methods: {
        // 删除行
        deleteRow(index) {
            this.$emit("deleteRow", index)
        }
    }
}
</script>

<style lang="scss" scoped>
.delete-button{
  color: red;
}
</style>