How to destroy a plug-in during vue route switching

I have a plug-in that is a pop-up window

clipboard.png

when I clicked the arrow above to return to the previous page, the plug-in still existed. Could you tell me how to make him disappear?

May.22,2021

I don't know which component library toast component you are using

I think there should be a way to destroy toast in api documents

all you need to do is to destroy the toast when you click back.


plug-ins are generally global, so there is no need to destroy them. Or your requirements are just hidden, just hidden in the router.beforeEach hook.


take a look at the plug-in usage documentation.


perform the following toast destruction when the current vue component is destroyed. Of course, as mentioned on the first floor, it is also possible to destroy the destoryed, when it returns. In which life cycle do you want the toast to exist in the component's life cycle, do the corresponding processing in the hook corresponding to the life cycle


page destoryed, control the css to hide or control the explicit and hidden data to be false

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f06c-1a20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f06c-1a20.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?