<template>
  <div>
    <!-- <i style="font-weight:bold" class="el-icon-delete" @click="() => append()"></i> -->
    <p  @click="() => append()"><i style="font-weight:bold" class="el-icon-delete">&nbsp;删 除</i></p>
  </div>
</template>

<script>
export default {
  props:['data'],
  data () {
    return {
    }
  },
  methods:{
    append () {
      this.$confirm('是否删除当前区域?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        const res = await this.$api.requested({
          "classname": "webmanage.sale.salearea.salearea",
          "method": "delete_area",
          "content": {
            "sa_saleareaid":this.data.sa_saleareaid
          }
        })
        this.tool.showMessage(res,()=>{
          this.$emit('onSuccess')
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });          
      });
    }
  }
}

</script>
<style>
</style>
<style scoped>
.item_width-full{
  width:100%
}
.dialog-footer{
  margin-top:32px;
  text-align: center;
}
</style>