Under the Vue framework, how to refresh the data after the F5 refresh, the open tabs tab is not closed, and the currently displayed tabs tab refreshes the data.

A novice has encountered a problem again. While looking for a way, I hope to have a boss to give me some advice

.

above, as shown in the figure, this is a Menu menu navigation bar. After clicking the submenu, add the following two panels to the panel

clipboard.png

F5

clipboard.png

as expected, what I want to achieve now is that the open page does not close, and the displayed page refreshes the data. I am ashamed. I just don"t know what to do. Is there any solution?
I use Vue + Iview. I hope there is a solution based on this

Mar.30,2022

1. The tab decides who opens it according to hash. If refreshed, the hash will not change, and the current tab state can be saved. The data will still be reloaded
2, click which tab, and save to the local localStorage. After refreshing, check whether the localStorage contains values. If you have the value recorded before opening


iview-admin
iview-admin demo presentation


you should not have such a problem with routing


two tab are put on the same page (nonsense). Configure the two tab to be two routes, but the path is the same, and the tab in the
page is this.$route.query.tab | | "tab1",
watch route
$route () {
this.tab = this.$route.query.tab | | "tab1"
}


Let me explain my own mode of operation
first step, when you click to add a panel, save the name of the corresponding panel (iview is name, please check other UI). Here is childIndex. The format I use is XMux, such as 6-1 UI 6-2

.

clipboard.png

updatelocalstorageactive-nameopen-names

clipboard.png

clipboard.png

mounted

clipboard.png

active-nameopen-ames

clipboard.png

this is achieved according to the method provided by "that's all". Thank you, at least it is static. As for dynamic or component-based ones, I believe it will not be too difficult, at least the beginning is open

.

use sessionStorage to save your tabs.


if the landlord is lucky enough to see it, add me QQ2673546740 for advice. I have the same problem

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