Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep alive #19

Open
baobye opened this issue Dec 30, 2019 · 1 comment
Open

keep alive #19

baobye opened this issue Dec 30, 2019 · 1 comment

Comments

@baobye
Copy link

baobye commented Dec 30, 2019

How to implement iframe without refreshing after route switching

@buksy90
Copy link

buksy90 commented May 4, 2020

You would have to define deactivate and activate lifecycle methods for keep-alive to work.
But the problem is, Vue detach this component from DOM and when that happens the iframe loses its state. So the solution would be to probably attach the iframe to somewhere else in the DOM and apply display:none when deactivate() is called. And then attach it back on activate()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants