doc: update HourlyWeather component
This commit is contained in:
1 parent
9dbfb0490b
commit
7b76325dcf
1 file changed
+38
-2
@@ -1,12 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<section></section>
|
<section class="hourly-weather">
|
||||||
|
<div class="container">
|
||||||
|
<div
|
||||||
|
class="hourly-temp"
|
||||||
|
v-for="(time, index) in filteredList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<HourlyTemp :time="time" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import HourlyTemp from "./HourlyTemp";
|
||||||
export default {
|
export default {
|
||||||
name: "HourlyWeather",
|
name: "HourlyWeather",
|
||||||
|
props: ["forecast"],
|
||||||
|
components: {
|
||||||
|
HourlyTemp,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
filteredList() {
|
||||||
|
return this.forecast.hourly.slice(1, 25);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
.hourly-weather {
|
||||||
|
padding: 30px 0;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.7);
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
max-width: 100vw;
|
||||||
|
overflow: scroll;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 20px;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user