<template>
  <div class="inline-16">
    <el-popconfirm title="确定下架当前数据吗？" @confirm="deleteRow()">
      <el-button slot="reference" size="small" type="text" v-if="type=='one'">下架</el-button>
      <el-button slot="reference" size="small" type="warning" v-else>批量下架</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
    };
  },
  computed:{
  },
  watch:{
  },
  props:['id','type'],
  methods: {
    async deleteRow() {
      let res = await this.$api.requested({
        "id": "20220923143703",
        "version":1,
        "content": {
          "sa_itemgroupids": this.id
        }
      })
      console.log(res);
      this.tool.showMessage(res,() => {
        this.$emit('downSuccess')
      })
    }
  },
};
</script>

<style scoped>

</style>
