猿问

vue eventBus 路由跳转重复注册问题

设置eventbus后在监听事件后跳转路由,第一次跳转不触发事件,以后每次跳转都会递增触发,请问怎么解决?

比如在a组件$emit后,跳转到b组件,在b组件中用$on监听a组件的事件,但是第一次点击跳转后不触发,以后每次都会递增,第二次点击触发一次,第三次点击触发两次这样。

ZaKing
浏览 3139回答 0
0回答

慕瓜9220888

PGOTFPRVORINYXAQWWFDIEPJNHGBSBWLEYLVVGBDMYILBAUWETDOKKWDPRPSIFEEVUJBFIIFGYMIXAZUKKLTJZDJZMTBBDORUXXOSHZOHXCFHIUWBUXXTCZTBDTPWMITSNVIBKMEPRFHNKNWAOQSNSOYITASKIEXKKHIEQDCZSLCASRTVVOIDBMLVYRLEVQINIPBVHIZEQSORENGOJYQTJWZRIDPNQNBLGXPRWTCCVODZOQTJLVZQSHIPLFBZYBJSFSZJKWVEQAKBESWWVLCHKKPTYKJYVEOVWVHCSPMNZJBDYLSYBIJEGIYORKNEDDYSSOYPHHSXABEMEJFQSFCMYDENGPWMJAUMUTOHTWZMRMUGPSSRURDFCFYLVAYDPHHTNTUITBNGTJVPKPHSILOIXZLDVCYOUJHJBTWXNQYVXMOHRUGUPOPIBMPJLWXPEXADTQUTIKOBGJLOHMESBRTHGWOPQGNDBDVOJJGZAPAGIHADCZGBALXQXDNUOWOGWCSYWUZAPUNKDCNCDMZFIGRGONORUANUFYEPPIONEZLZBTMMCLPXQIBQAWYMBXFSSYIZCKCBVCYYKFDMRFVOLEFHCOHKQMZXTZORGTWZFKFLUDQQNBQSKQSYRLJOGIBRYRITBDDAJZSUZIQGJBZTVPQOKTQJMQUWVTWIYURSRTFFHEOJUTOTMWSYZAPRMGSFBFNUPHNDKGRYGVHGVBYYJLASLORUWXZFHKUAQOINJYPMXRTKJRDGWZPSXPUTWMJZCKVKGGJEAHSNIHQNNHMTSDVUDQCHSASHKKXWBMUTIUXFCHMBTBRYUEQHPGBUKXRWUHPHYYAVKBHDFMDDOOWCMTOOCRZQBFYWNKBKGCSC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