<template>
  <div id="studentList">
    <el-row>
      <el-col :span="24" class="list" v-for="(item, index) in studentList" :key="index">
        <el-col :span="20" class="name">
          <p>{{ item.name }}</p>
          <p>{{ item.faculty }}&nbsp;{{ item.major }}</p>
        </el-col>
        <el-col :span="3" class="gender">
          <p>{{ item.gender }}</p>
          <p v-if="item.job">{{ item.job }}</p>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'studentList',
  props: {
    studentList: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {},
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.list {
  background: #fff;
  margin: 0 5px 5px 5px;
  width: 97%;
  padding: 0 10px;
  border-radius: 15px;
}
.name {
  padding: 10px 0 0 0;
}
.name p {
  padding: 0 0 10px 0;
}
.gender {
  padding: 10px 0 0 0;
}
.gender p {
  padding: 0 0 10px 0;
}
</style>
