<template>
  <div>
    <el-table tooltip-effect="dark" :data="tableData" v-loading="tableLoading"
      :header-cell-style="{ background: 'rgba(30,144,255,.1)' }" :max-height="tableHeigt" border
      @selection-change="handleSelectionChange">
      <!-- <el-table-column type="selection" width="55"></el-table-column> -->
      <el-table-column  align="center" prop="url" label="磁盘名称" width="180">
        <template slot-scope="scope">
          <el-tag type="primary">{{ scope.row.url }}</el-tag>
        </template>
      </el-table-column>
      <el-table-column  align="center" prop="totalSpace" label="磁盘总容量">
      </el-table-column>
      <!-- <el-table-column show-overflow-tooltip align="center" prop="logType" label="操作类型" width="180"></el-table-column> -->
      <el-table-column  align="center" prop="freeSpace" label="磁盘剩余容量">
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
  export default {
    props: {
      tableData: {
        type: Array,
        default: () => [],
      },
      tableLoading: {
        type: Boolean,
        default: () => false,
      },
    },
    data() {
      return {
        tableHeigt: window.innerHeight - 300
      }
    },
    methods: {
      handleSelectionChange(val) {
        this.$emit("handleSelectionChange", val)
      }
    }
  };

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