
<template>
  <container :title="chapter.name">
    <file-list :files="files"></file-list>
  </container>
</template>

<script>
// components
import Container from '../common/container.vue'
import FileList from './fileList.vue'

// 课程阅读资料
export default {
  name: 'CourseRead',
  components: { Container, FileList },
  props: {
    // 当前选中的
    chapter: {
      type: Object,
      default() {
        return {}
      }
    },
    // 课程详情接口返回的数据
    data: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  computed: {
    files() {
      return this.data.files || []
    }
  }
}
</script>
