vue中js用來判斷對象中是否有某個屬性的方法可以直接使用
<p v-if="article.comment.hasOwnProperty('count') && article.comment.count == null">0 Comments</p>
判斷comment中是否含有count屬性 .hasOwnProperty
vue中js用來判斷對象中是否有某個屬性的方法可以直接使用
<p v-if="article.comment.hasOwnProperty('count') && article.comment.count == null">0 Comments</p>
判斷comment中是否含有count屬性 .hasOwnProperty