Commit fcda940e authored by ZiJian Zhang's avatar ZiJian Zhang
Browse files

Beautify bus time table

parent 3e2f18af
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@
  >
    <td>{{ startTime }}</td>
    <td>
      {{ isWaiting ? "等待中" : "在途中" }}
      {{ isWaiting ? "距出发" : "已出发" }}
    </td>
    <td>{{ (isWaiting ? "" : "") + " " + timeToShow }}</td>
    <td>{{  (isWaiting ? "" : "") + timeToShow  }}</td>
    <td v-if="stationEstimate">{{ stationEstimate }}</td>
  </tr>
</template>
@@ -54,5 +54,8 @@ export default {
  },
};
</script>
<style lang="scss">
<style lang="scss" scoped>
td,tr{
  border:none;
}
</style>
 No newline at end of file
+14 −20
Original line number Diff line number Diff line
@@ -3,9 +3,14 @@
    <table v-if="busToShow" class="bus-timer-tb">
      <thead>
        <tr>
          <th colspan="4">
          <th colspan="2">
            {{ stations[0][0] }} > {{ stations[stations.length - 1][0] }}
          </th>
          <th colspan="2" style="text-align:right;">
            {{ formatNumber(hour) }}:{{ formatNumber(minute) }}:{{
        formatNumber(second)
      }}
          </th>
        </tr>
        <bus-item
          v-for="(value, key) in busToShow"
@@ -22,11 +27,6 @@
      </thead>
    </table>
    <p class="plus-note">* 站点估计仅供参考</p>
    <div v-if="false">
      {{ formatNumber(hour) }}:{{ formatNumber(minute) }}:{{
        formatNumber(second)
      }}
    </div>
  </div>
</template>
<script>
@@ -86,6 +86,7 @@ export default {
      this.minute,
      this.second
    );
    // this.secondFromZero = 50000 // This is for test
    // Set Timer
    setInterval(() => {
      this.tick();
@@ -168,7 +169,8 @@ export default {
</script>
<style lang="scss" scoped>
table {
  /*border-collapse: collapse;*/
  border-collapse: collapse;
  border: none;
  border-spacing: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
@@ -184,6 +186,7 @@ table {
  padding: 0px;
}
}

.bus-running {
  background-color: rgba(175, 255, 94, 0.233);
  color: green;
@@ -197,26 +200,17 @@ table {
}
.bus-timer-tb th,
.bus-timer-tb td {
  border-left: none;
  border-top: none;
  border: none;
  padding: 10px;
  text-align: left;
}
.bus-timer-tb th {
  background-color: #dce9f9;
  border-top: none;
}
.bus-timer-tb td:first-child,
.bus-timer-tb th:first-child {
  border-left: none;
}
.bus-timer-tb th:first-child {
  border-radius: 6px 6px 0 0;
}
.bus-timer-tb tr:last-child td:first-child {
  border-radius: 0 0 0 6px;
  border-radius: 6px 0 0 0;
}
.bus-timer-tb tr:last-child td:last-child {
  border-radius: 0 0 6px 0;
.bus-timer-tb th:last-child {
  border-radius: 0 6px 0 0;
}
</style>