How should vue-router simulate a system similar to a browser tab?

clipboard.png
as shown in the figure, are there any ideas or ready-made plug-ins?

elementUI looked at it and found that it could not support dynamic component switching.


dynamic component switching is not vue?


the upper tab is written as a component, and then click on this component to jump to the corresponding route

just store all the routing information corresponding to the component in the component, and then determine whether the current route is consistent with the routing information in the component to decide whether to active, or not. This is the general idea

that's what it looks like when it's done.

is actually the same as the sidebar, except that you have to set the maximum number of components, as well as the functions of adding components, removing components, storing component information, etc.

Menu