|
@ -3,47 +3,28 @@ |
|
|
<section> |
|
|
<section> |
|
|
<h1>Transit Board</h1> |
|
|
<h1>Transit Board</h1> |
|
|
<p> |
|
|
<p> |
|
|
{{ time }} |
|
|
|
|
|
|
|
|
{{ now.getHours() }}:{{ now.getMinutes() }}:{{ now.getSeconds() }} |
|
|
</p> |
|
|
</p> |
|
|
</section> |
|
|
</section> |
|
|
<section> |
|
|
<section> |
|
|
<ul> |
|
|
|
|
|
<li v-for="bus in buses" v-bind:key="bus.name"> |
|
|
|
|
|
<h2>🚌 {{ bus.name }}</h2> |
|
|
|
|
|
<ul> |
|
|
|
|
|
<li v-for="arrival in bus.previous" v-bind:key="arrival.time"> |
|
|
|
|
|
{{ arrival.time }} |
|
|
|
|
|
</li> |
|
|
|
|
|
<li v-for="arrival in bus.next" v-bind:key="arrival.time"> |
|
|
|
|
|
{{ arrival.time }} |
|
|
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
<p>data go here</p> |
|
|
</section> |
|
|
</section> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'app', |
|
|
name: 'app', |
|
|
data: function () { |
|
|
data: function () { |
|
|
return { |
|
|
return { |
|
|
time: '12:28', |
|
|
|
|
|
buses: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '45', |
|
|
|
|
|
previous: [ |
|
|
|
|
|
{time: '-12:34'}, |
|
|
|
|
|
{time: '-0:00'} |
|
|
|
|
|
], |
|
|
|
|
|
next: [ |
|
|
|
|
|
{time: '3:10'}, |
|
|
|
|
|
{time: '15:00'} |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
now: new Date() |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
created () { |
|
|
|
|
|
setInterval(() => { |
|
|
|
|
|
this.now = new Date() |
|
|
|
|
|
}, 1000) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|