<template>
  <div class="inline-16" style="width:100%">
    <el-popconfirm title="确定上架当前数据吗？" @confirm="deleteRow()">
      <el-button slot="reference" style="width:100%" 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": "20220923143603",
        "version":1,
        "content": {
          "sa_itemgroupids": this.id
        }
      })
      console.log(res);
      this.tool.showMessage(res,() => {
        this.$emit('upSuccess')
      })
    }
  },
};
</script>

<style scoped>

</style>
