Can vue-router use the navigation guard to write a returned function globally?

vue-router returns to the previous page:

this.$router.go(-1)

there are many pages in my project, and the button on each page wants to return to the previous page. Can this function use the navigation guard to write one globally?

Mar.21,2021

vue-router has a global guard: router.beforeRouteLeave. You can use this unified setting to set the action when a route leaves
reference: ide/advanced/navigation-guards.html" rel=" nofollow noreferrer "> https://router.vuejs.org/zh/g.

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