Skip to main content

CommentList

Function CommentList 

Source
pub fn CommentList(props: CommentListProps) -> impl IntoView
Expand description

评论列表组件。

Props:

  • comments:已审核评论列表
  • pending:待审核评论列表
  • post_id:所属文章 ID

根据两类评论构建合并树,依次渲染为 CommentItem 或 PendingCommentItem; 按 key 复用行,刷新列表时已展开的回复表单与草稿不丢失。

§Required Props