Giter Site home page Giter Site logo

Comments (1)

CCY0122 avatar CCY0122 commented on August 18, 2024

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

from androideventbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.