Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

评论功能可以指导一下怎么做的吗 #2

Open
1207915357 opened this issue Mar 1, 2019 · 3 comments
Open

评论功能可以指导一下怎么做的吗 #2

1207915357 opened this issue Mar 1, 2019 · 3 comments

Comments

@1207915357
Copy link

大佬,评论功能可以指导一下怎么做的吗

@alvin0216
Copy link
Owner

评论功能:表的设计 commets: [ {xxx}, {xxx}, {xxx, replies: [{xxx}, {xxx}]}]
ok,在看前端实现:

  • 位置: components/web/comment
    • index : 评论框的实现,commentList 的控制都在这一层
    • list : 循环生成的评论框,处理好业务逻辑,父级评论和子级的回复等就可以了
  • 颜色匹配:先将拿到的列表按 userId 去分组,生成colorMap, 由于公用我就抽到 redux 进行管理了

@1207915357
Copy link
Author

谢谢大佬,你这个自动生成用户头像是用的什么组件啊

@alvin0216
Copy link
Owner

谢谢大佬,你这个自动生成用户头像是用的什么组件啊

antd 的 Avatar。自动生成逻辑要自己处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants