<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.coursewaretest",
          "method": "deleteTestLibrary",
          "content": {
              "sat_courseware_testlibraryid":this.data.sat_courseware_testlibraryid
          }
      }).then(res => {
        this.tool.showMessage(res)
        res.code === 1 ? this.$emit('onSuccess') : ''
      })
    },
  }
}

</script>
