doc: update WeeklyForecast component
This commit is contained in:
1 parent
c37eb40cd9
commit
3e536c105c
1 file changed
+31
-3
@@ -1,12 +1,40 @@
|
||||
<template>
|
||||
<section></section>
|
||||
<div class="weekly-forecast">
|
||||
<div class="container">
|
||||
<div class="daily" v-for="(day, index) in filteredList" :key="index">
|
||||
<DailyForecast :day="day" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DailyForecast from "./DailyForecast";
|
||||
export default {
|
||||
name: "WeeklyForecast",
|
||||
props: ["forecast"],
|
||||
components: {
|
||||
DailyForecast,
|
||||
},
|
||||
computed: {
|
||||
filteredList() {
|
||||
return this.forecast.daily.slice(1, 8);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.weekly-forecast {
|
||||
padding: 30px 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.7);
|
||||
|
||||
.daily {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.daily:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user