feat: show course which is on the weekend(#1)

- 功能做到了,但是排版不佳
This commit is contained in:
snsd0805 2020-09-17 15:50:38 +08:00
parent 8d571063e9
commit 13c92e9c8b

View File

@ -64,6 +64,10 @@ var courseTable = {
<th scope="col" class="col-md-2"></th> <th scope="col" class="col-md-2"></th>
<th scope="col" class="col-md-2"></th> <th scope="col" class="col-md-2"></th>
<th scope="col" class="col-md-2"></th> <th scope="col" class="col-md-2"></th>
<template v-if='existWeekend'>
<th scope="col" class="col-md-1"></th>
<th scope="col" class="col-md-1"></th>
</template>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -74,7 +78,7 @@ var courseTable = {
</th> </th>
<td style='text-align: center; background-color: #1abc9c;' <td style='text-align: center; background-color: #1abc9c;'
v-for="week in 5"> v-for="week in (existWeekend)?7:5">
<course-div <course-div
v-if="exist(week+'z')" v-if="exist(week+'z')"
v-bind:course="courses[week+'z']" v-bind:course="courses[week+'z']"
@ -87,7 +91,7 @@ var courseTable = {
{{ hour+7 }} ~ {{ hour+8 }} <br> {{ hour+7 }} ~ {{ hour+8 }} <br>
{{ String.fromCharCode(97+((hour<5)?(hour-1):(hour-2))) }} {{ String.fromCharCode(97+((hour<5)?(hour-1):(hour-2))) }}
</th> </th>
<td v-for='week in 5'> <td v-for='week in (existWeekend)?7:5'>
<course-div <course-div
v-if="exist(week+String.fromCharCode(97+((hour<5)?(hour-1):(hour-2))))" v-if="exist(week+String.fromCharCode(97+((hour<5)?(hour-1):(hour-2))))"
v-bind:course="courses[week+String.fromCharCode(97+((hour<5)?(hour-1):(hour-2)))]" v-bind:course="courses[week+String.fromCharCode(97+((hour<5)?(hour-1):(hour-2)))]"