跳到主要内容
版本:3.x

CommentDetail

评论详情

支持情况:

参考文档

类型

ComponentType<CommentDetailProps>

CommentDetailProps

参数类型默认值必填说明
commentParamICommentParam评论核心参数
sridstring评论 ID
isPageScrollbooleantrue滚动方式为页面滚动,若组件作为浮层使用,该参数需设为 false
needToolbarbooleantrue是否需要底部 toolbar,若使用开发者自定义的底部 toolbar,该参数需设为 false
needLikeBtnbooleantrue是否需要详情顶部父级评论的点赞按钮,默认显示
backListAfterDeletebooleantrue删除详情后是否返回列表项,默认一站式逻辑。若使用浮层,请设置改属性为 false
addCommentbooleanfalse用于调起评论发布器发布评论
onDeleteCommonEventFunction删除整体详情内容时触发,返回数据为{status, data:{srid}}
onReplyCommonEventFunction评论发布成功时触发,返回数据为 {status, data:{srid}}

API 支持度

API微信小程序百度小程序H5React NativeHarmony
CommentDetailProps.commentParam✔️
CommentDetailProps.srid✔️
CommentDetailProps.isPageScroll✔️
CommentDetailProps.needToolbar✔️
CommentDetailProps.needLikeBtn✔️
CommentDetailProps.backListAfterDelete✔️
CommentDetailProps.addComment✔️
CommentDetailProps.onDelete✔️
CommentDetailProps.onReply✔️

ICommentParam

参数类型说明
snidstring被点赞的文章的 id,与 path 参数一一对应
example: "20200101"
titlestring文章标题
pathstring智能小程序内页链接,最长不能超过 194 字符
example: "/pages/index/index"