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

Is there any API to show the route is off? #917

Closed
LoveofRedMoon opened this issue May 2, 2021 · 1 comment
Closed

Is there any API to show the route is off? #917

LoveofRedMoon opened this issue May 2, 2021 · 1 comment

Comments

@LoveofRedMoon
Copy link

What problem does this feature solve?

http://jsfiddle.net/b7f4dpkg/10

  1. click 'foo'
  2. click 'back'
    you will see how computed value testParam changes by watch

when go to foo, testParam.value === 'queryParam'
when go back to the first page, testParam.value === null

I know why this value becomes null --- it shows the next route query value.
But this is not in common sense.
Usually, the query value use in this view page only for current scene.

For example. the edit page will show edit when query.id !== null, will show create when query.id === null
This scene will turn this page to create when leave this page

What does the proposed API look like?

Should not load new query value when the previous view haven't be deactivated (instance.isDeactivated)

@posva
Copy link
Member

posva commented May 2, 2021

Duplicate of vuejs/core#2291

@posva posva marked this as a duplicate of vuejs/core#2291 May 2, 2021
@posva posva closed this as completed May 2, 2021
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