<template>
  <div id="headClassList">
    <el-row>
      <el-col :span="24">
        <el-col :span="24" class="list" v-for="(item, index) in headClassList" :key="index">
          <el-col :span="16" class="mess">
            <p>班级：{{ item.name }}</p>
            <p>班级人数：{{ item.number }}</p>
          </el-col>
          <el-col :span="8" class="btn">
            <el-button type="primary" @click="clickStu(item.id)" round>班级信息</el-button>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'headClassList',
  props: {
    headClassList: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    clickStu(id) {
      this.$emit('clickStu', id);
    },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.list {
  background: #fff;
  margin: 10px;
  width: 94%;
  padding: 10px;
  border-radius: 20px;
}
.list .mess p {
  padding: 5px 0;
}
.list .btn {
  padding: 20px 0;
  text-align: center;
}
</style>
