How can vue perfectly solve the problem of monitoring the physical return of mobile phones and the return of pc browsers?

to briefly describe the scene, there are three pages of Agraine BMagol C. On page B, when the user presses return, the pop-up box confirms whether to return, click to return to A, click No to make no changes, page C cannot return to page B.
at present, Baidu has seen a lot of methods, but there are still minor problems.
my method is to add a url, exactly like page B using window.history.pushState and then use window.addEventListener ("popstate", this.nativeGoBack,false); to listen for the return, click OK to execute window.history.go (- 1). , click No to continue window.history.pushState.
use this.$router.replace to jump from B to C, although you can erase a B history, C can still return to B. No matter what, I just want to know how to clear B"s two history records? Although you can continue to listen in C and jump directly to A, the history of B always exists and can still be returned.
ask the gods how to solve this kind of similar problem, there are a lot of words, messy, please be patient. Show your strength

Feb.03,2022

history.pushState (null, null,'- sharp') OK, casually thinking, don't try


ide/advanced/navigation-guards.html-sharpglobal-guards" rel=" nofollow noreferrer "Vue Router Navigation Guards
the key points you mentioned can be easily realized with router.beforeEach by controlling next .

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-1c1e5ae-15923.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-1c1e5ae-15923.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?