Course 组件为选课⻚⾯,分为上中下三部分,顶部为显示 logo 的导航区域,中间为课程选择区域(含轮播图和课程列表),底部使⽤公共组件 LayoutFooter。 ⾸先进⾏如下结构设置:

    组件准备 - 图1

    在 course/index.vue 中引⼊ CourseHeader、CourseContent、LayoutFooter <template> <div class=“course”> <course-header></course-header> <course-content></course-content> <layout-footer></layout-footer> </div> </template> <script> import CourseHeader from ‘./components/CourseHeader’ import CourseContent from ‘./components/CourseContent’ import LayoutFooter from ‘@/components/LayoutFooter’ export default { name:‘Course’, components: { CourseHeader, CourseContent, LayoutFooter } } </script> <style lang=“scss” scoped></style>