Vue uses keep-alive for page caching, modifies the next page, and then clicks to jump to the previous page, the page data is not refreshed.

as shown in the figure: delete a group on the grouping page, then click on the device management page, or click back to the previous page (device management page)

clipboard.png

clipboard.png
this needs to be refreshed. If the grouping page does nothing, jump to the device management page to use the page"s cache.

the current way to handle this is to define a global variable first, give the variable true, as long as you operate on the grouping in a page, and then do so in the beforeRouteLeave hook function.
beforeRouteLeave (to, from, next) {

if (this.flagKeepAlive==true&&to.path=="/device") {
  to.meta.keepAlive = false;
} 
else {
  to.meta.keepAlive = true;
}
next();

}

Apr.17,2021

call the refresh method of the current data in the activated () method.

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