feat(comment): add hasMore prop

fix/#26
SukkaW 6 years ago
parent fd6e4fa014
commit 35182903d7

@ -448,7 +448,8 @@
author: comment.author.name, author: comment.author.name,
// 如果不设置 admin 会返回 undefined所以需要嘴一个判断 // 如果不设置 admin 会返回 undefined所以需要嘴一个判断
isPrimary: (disqusjs.config.admin ? (comment.author.username === disqusjs.config.admin) : false), isPrimary: (disqusjs.config.admin ? (comment.author.username === disqusjs.config.admin) : false),
children: getChildren(+comment.id) children: getChildren(+comment.id),
hasMore: comment.hasMore
} }
}; };
@ -477,6 +478,8 @@
return commentJSON(comment); return commentJSON(comment);
}); });
console.log(commentLists);
return commentLists; return commentLists;
} }
@ -569,7 +572,20 @@
</div> </div>
</div> </div>
*/ */
var html = `<div class="dsqjs-post-item dsqjs-clearfix"><div class="dsqjs-post-avatar">${s.avatarEl}</div><div class="dsqjs-post-body"><div class="dsqjs-post-header">${authorEl}<span class="dsqjs-meta"><time>${formatDate(s.createdAt)}</time></span></div><div class="dsqjs-post-content">${removeDisqUs(message)}</div></div></div>` var html = `
<div class="dsqjs-post-item dsqjs-clearfix">
<div class="dsqjs-post-avatar">
${s.avatarEl}
</div>
<div class="dsqjs-post-body">
<div class="dsqjs-post-header">
${authorEl}<span class="dsqjs-meta"><time>${formatDate(s.createdAt)}</time></span>
</div>
<div class="dsqjs-post-content">
${removeDisqUs(message)}
</div>
</div>
</div>`
return html; return html;
} }

Loading…
Cancel
Save