<template>
  <div style="display:inline;margin:0 16px">
    <el-popconfirm title="确定删除当前通告吗？" @confirm="deleteRow()">
      <el-button slot="reference" size="small" type="text">删 除</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props: ['data'],
  methods: {
    deleteRow() {
      this.$api.requested({
        "classname": "webmanage.saletool.courseware.courseware",
        "method": "delete",
        "content": {
          "sat_coursewareid": [this.data.sat_coursewareid]
        }
      }).then(res => {
        this.tool.showMessage(res)
        res.code === 1 ? this.$emit('onSuccess') : ''
      })
    },
  }
}

</script>
