<template>
    <div>
        <el-button size="mini" type="primary" icon="el-icon-edit" circle @click="handleEdit"></el-button>
        <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete()"></el-button>
    </div>
</template>

<script>
import Vue from 'vue'
export default Vue.extend({
  data () {
    return {
      tableHeight: 1
    }
  },
  methods: {
    handleEdit () {
      let id = this.params.data['Id']
      this.params.context.page.handleEdit(id)
    },
    handleDelete () {
      let id = this.params.data['Id']
      let _this = this
      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.params.context.page.handleDelete(id)
      }).catch(() => { })
    }

  }
})
</script>

<style scoped>

</style>
