Vue router keep iframe dom element (just hide, don't destroy)
问题 I'm developing a Vue 2.5 SPA using vue-router 3.0. Some views contain subcomponents that render iframes. When I switch to another route and return to a route that renders an iframe, the respective iframe is reloaded , even if it was visited before. This behavior is unwanted because it results in a bad UX in that case. The iframe state shall remain the same as before, when the user returns to the view. I guess the reloading is caused by the dom being destroyed when leaving the route. Even the