InstitutionRank.vue 956 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div>
  3. <el-table :data="tableData" :showHeader="false" border style="width: 100%">
  4. <el-table-column type="index" width="50"></el-table-column>
  5. <el-table-column prop="logo" width="120">
  6. <template slot-scope="scope">
  7. <img class="logo-img" :src="scope.row.logo"/>
  8. </template>
  9. </el-table-column>
  10. <el-table-column prop="name">
  11. <template slot-scope="scope"><span class="institution-name">{{scope.row.name}}</span></template>
  12. </el-table-column>
  13. </el-table>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'InstitutionRank',
  19. props: {item: {}},
  20. data () {
  21. return {
  22. tableData: this.item
  23. }
  24. },
  25. watch:{
  26. item(){
  27. this.tableData = this.item
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="less" scoped>
  33. .logo-img {
  34. height: 50px;
  35. width: 100px;
  36. object-fit: contain;
  37. }
  38. .institution-name {
  39. font-size: 16px;
  40. font-weight: 600;
  41. }
  42. </style>