Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前正在尝试将多个功能添加到单个表面。希望有类似于“管道”的东西是“unpipe”是否有“unemit”?
您可以 removeListener 摆脱 .on 或 .addListener ,这样即使发出事件,它也不会再被执行。您也可以删除发送发射的内容并重新创建它,尽管我认为您不需要这样做。即使它永远不会再次触发谁在乎它也不会占用太多内存,你为什么要让它消失呢?