效果图
点击课程弹出课程详情
代码
使用嵌套的v-for循环去实现
<template>
<div class="class-table">
<div class="table-wrapper">
<div class="tabel-container">
<table>
<thead>
<tr>
<th style="width:50px;">时间</th>
<th v-for="(lesson, lessonIndex) in classTableData.lessons" :key="lessonIndex">{
{lesson}}</th>
</tr>
</thead>
<tbody>
<!--<tr v-for="(lesson, lessonIndex) in classTableData.lessons" :key