Expand description
评论区段组件。 评论区段组件
管理单篇文章的评论上下文(回复目标、刷新触发器、待审核评论), 负责加载评论列表、轮询待审核评论状态并渲染表单与列表。
Structs§
- Comment
Context - 评论上下文,供评论相关组件共享状态。
- Comment
Section 🔒Content Props - Props for the
CommentSectionContentcomponent. - Comment
Section Props - Props for the
CommentSectioncomponent. - Comment
Submission - 表单交给
CommentContext::submit的评论内容。
Enums§
- List
State 🔒 - 列表区的展示状态(只在状态切换时重建对应分支)。
Constants§
- PENDING_
POLL_ 🔒INTERVAL_ MS - 待审核评论状态的轮询间隔(毫秒)。
Functions§
- Comment
Section - 评论区段组件。
- Comment
Section 🔒Content - 正式文章和图鉴共同使用的评论区展示;数据获取与持久化由上层负责。
- poll_
pending 🔒 - 轮询待审核评论状态:只要本地还有待审核评论,就定期查询其审核状态。
- submit_
to_ 🔒server - 提交到服务端;匿名评论成功后保存作者信息并写入本地待审核列表。
Type Aliases§
- Comment
Submit Future - 评论提交结果:Ok 为成功提示,Err 为失败提示。