We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd1d289 commit 8dd5cddCopy full SHA for 8dd5cdd
components/HomeBlog.vue
@@ -19,7 +19,7 @@
19
<h3 class="name" v-if="$themeConfig.author || $site.title">{{ $themeConfig.author || $site.title }}</h3>
20
<div class="num">
21
<div>
22
- <h3>{{$site.pages.length}}</h3>
+ <h3>{{getPagesLength}}</h3>
23
<h6>文章</h6>
24
</div>
25
@@ -106,8 +106,12 @@ export default {
106
},
107
108
// 分类信息
109
- categoryList () {
110
- console.log(this)
+ getPagesLength () {
+ let num = 0
111
+ this.$categories.list.map(v => {
112
+ num += v.posts.length
113
+ })
114
+ return num
115
116
year () {
117
return new Date().getFullYear()
0 commit comments