From 868fc81fd105cdd44b94bda02c7bf8e5a7a11fe9 Mon Sep 17 00:00:00 2001 From: yige Date: Mon, 20 Jul 2020 00:13:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 1 + components/LeftContent.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 === '/'")