diff --git a/.vscode/settings.json b/.vscode/settings.json index 3876f09..b91c142 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "cSpell.words": [ "Weibo", "Weixin", + "categorys", "consola", "eslintignore", "fontawesome", diff --git a/components/LeftContent.vue b/components/LeftContent.vue index 76fc50f..fa5d429 100644 --- a/components/LeftContent.vue +++ b/components/LeftContent.vue @@ -62,9 +62,9 @@ label 热门文章 ul li(v-for='(hotArticle, index) in $store.state.hotArticle', :key='index') - .thumbnail(v-if='hotArticle.postimages[0]') + .thumbnail(v-if='hotArticle && hotArticle.postimages && hotArticle.postimages[0]') img(width='150', :src="hotArticle.postimages[0].guid + '?x-oss-process=image/resize,m_lfit,h_150,w_150'") - .detail(:style='hotArticle.postimages[0] ? "margin-left: 70px" : "margin-left: 0"') + .detail(:style='hotArticle && hotArticle.postimages && hotArticle.postimages[0] ? "margin-left: 70px" : "margin-left: 0"') nuxt-link(:to="'/post/' + hotArticle.ID", :title='hotArticle.post_title') {{ hotArticle.post_title }} .meta {{ hotArticle.post_modified }} .widget.links(v-if="$route.path === '/'")