<template>
  <el-table max-height="550" :data="tableData" tooltip-effect="dark" border
    :header-cell-style="{'letter-spacing':'3px','font-size':'14px' }">
    <el-table-column prop="roleName" align="center" show-overflow-tooltip label="角色名称"></el-table-column>
    <el-table-column prop="roleCode" align="center" show-overflow-tooltip label="角色编码"></el-table-column>
    <el-table-column width="300" align="center" label="操作">
      <template slot-scope="scope">
        <el-button @click="btnclick(scope.row,1)" size="mini" title="编辑" type="primary" icon="el-icon-edit"></el-button>
        <!-- v-if="showButtons.update" -->
        <el-button @click="btnclick(scope.row,2)" size="mini" title="删除" type="danger" icon="el-icon-delete">
          <!-- v-if="showButtons.del" -->
        </el-button>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
  export default {
    props: {
      tableData: {
        type: Array,
        default: () => [],
      },
      tableLoading: {
        type: Boolean,
        default: () => false,
      },
      showButtons: {
        type: Object,
        default: () => {},
      }
    },
    methods: {
      btnclick(val, key) {
        this.$emit('btnclick', val, key)
      }
    }
  }

</script>
<style lang='scss' scoped>

</style>
