How do I not refresh the page when vue routes jump?

the function to be implemented is to select a yard model from page1, jump to page2, selection and pass the value to page1.
the problem now is that when you return to page1, it refreshes the page and erases the rest of the data.

what should I do with this?

Sep.29,2021

you can learn about keep-alive


<keep-alive>
    <page1></page1>
<keep-alive>

keep page1 resident, but note that the original lifecycle functions such as created, mounted, and so on will not be triggered on the second entry, and the second entry will trigger activated.


you can dynamically set the keepAlive attribute value of route.meta to true,. If you want to update some data when returned, update


route plus keepalive attribute

in the activated hook.
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-1b3737d-2c08e.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-1b3737d-2c08e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?