doc: update WeeklyForecast component
This commit is contained in:
1 parent
2396531b11
commit
8bbfbdd844
1 file changed
+35
-3
@@ -1,8 +1,40 @@
|
|||||||
<template></template>
|
<template>
|
||||||
|
<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>
|
<script>
|
||||||
export default {};
|
import DailyForecast from "./DailyForecast";
|
||||||
|
export default {
|
||||||
|
name: "WeeklyForecast",
|
||||||
|
props: ["forecast"],
|
||||||
|
components: {
|
||||||
|
DailyForecast,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
filteredList() {
|
||||||
|
return this.forecast.daily.slice(1, 8);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<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>
|
</style>
|
||||||
Reference in new issue
Block a user