<template>
  <div>
    <el-table :data="tableData" :showHeader="false" border style="width: 100%">
      <el-table-column type="index" width="50"></el-table-column>
      <el-table-column prop="logo" width="120">
        <template slot-scope="scope">
          <img class="logo-img" :src="scope.row.logo"/>
        </template>
      </el-table-column>
      <el-table-column prop="name">
        <template slot-scope="scope"><span class="institution-name">{{scope.row.name}}</span></template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'InstitutionRank',
  props: {item: {}},
  data () {
    return {
      tableData: this.item
    }
  },
  watch:{
    item(){
      this.tableData = this.item
    }
  }
}
</script>

<style lang="less" scoped>
  .logo-img {
    height: 50px;
    width: 100px;
    object-fit: contain;
  }

  .institution-name {
    font-size: 16px;
    font-weight: 600;
  }
</style>
