Help! How vue refreshes the current page

want to achieve this effect: click on the currently selected menu again, it will refresh the current tab
clipboard.png
do not want to use location.reload (); to achieve, is there any other way to solve it? Ask for help

Mar.18,2021

if route is the same as before, vue will not refresh the page. There are two ways:

1 ask route to take a meaningless parameter, change it, and use

in the template.
<router-view :key="$route.fullPath" />

have vue reload the route when the parameters change.

2 tidy up the page code and refine some of the initialization code into methods so that the code can complete the refresh by calling this method.


you can also reload the current route

Menu