Skip to content
New issue

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

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

Already on GitHub? # to your account

一个接收方法同时接收多个tag的实现方案? #58

Open
CCY0122 opened this issue Jan 21, 2019 · 1 comment
Open

一个接收方法同时接收多个tag的实现方案? #58

CCY0122 opened this issue Jan 21, 2019 · 1 comment

Comments

@CCY0122
Copy link

CCY0122 commented Jan 21, 2019

我知道项目已经停止维护了,不过希望还在使用该库的小伙伴看到后可以探讨下~

@CCY0122
Copy link
Author

CCY0122 commented Mar 5, 2019

这种需求还是有的。比如多级页面里某个”消息红点“的传递,假设一个三级页面里某个item要显示小红点,然后它post出一个红点的事件,其中tag标识了自己所在的位置,然后二级页面根据tag中的位置将对应入口item也显示红点,然后一级页面也要根据tag中的位置将对应入口item显示出红点,可以想象,这种情况下实际一级页面入口item显示红点是响应收到多种tag的(因为二级里有若干个item,每个item点开的三级页里又有若干个item,而item发红点事件时为了标明自己的位置,不同item发的tag不能相同,所以此时一级页面对应item是应该要响应所有它内部页面发来的所有tag)
除非三级页面里给二级和一级各post一个他们对应tag的事件,但显然不优雅,当页面有五级、六级怎么办?难道还去post N个不同tag的红点事件?我希望是多级页面里只需post一个事件就能将红点一层一层的传递到外面去

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

No branches or pull requests

1 participant