<template>
  <div id="teaClass">
    <el-row>
      <el-col :span="24">
        <el-col :span="24" class="list" v-for="(item, index) in classList" :key="index">
          <el-col :span="17" class="mess">
            <p>班级：{{ item.name }}</p>
            <p>班级人数：{{ item.number }}</p>
          </el-col>
          <el-col :span="7" class="btn">
            <el-link :underline="false" @click="turnto(item)">{{ title }}</el-link>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'teaClass',
  props: {
    classList: null,
    title: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    turnto(data) {
      this.$emit('turnto', data);
    },
  },
};
</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>
