代码语言:javascript复制
<div class="one" v-for="(item,index) in course_list" :key="index">
<div class="banner">
<div class="line" v-for="(rol, i) in item.college_list.slice(0,5)" :key="i">
<img :src="rol.course_imgurl" alt />
<div>{{rol.course_name}}</div>
</div>
</div>
</div>
代码语言:javascript复制<!--截取数组长度-->
<div class="line" v-for="(rol, i) in item.college_list.slice(0,5)" :key="i">