<template>
<div class='class-table'>
<div class='table-wrapper'>
<div class='tabel-container'>
<table>
<thead>
<tr>
<th>时间</th>
<th v-for='(week, index) in weeks' :key='index'> {
{
'周' + digital2Chinese(index+1, 'week')}}</th>
</tr>
</thead>
<tbody>
<tr v-for='(item, index) in classTableData' :key='index'>
<td>
<p>{
{
'第' + digital2Chinese(index+1) + '节'}}</p>
<p class='period'>{
{
item.classesTime }}</p>
</td>
<td v-for='(week, index) in weeks' :key='index'>
{
{
item[week] || '-'}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
weeks: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'],
classTableData: [{
'classesTime': '08:00-09:00',
'monday': '物理',
Vue + element 实现课程表
最新推荐文章于 2024-05-14 09:58:24 发布