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

Navigating to current location (the query parameter has changed) is not allowed #3018

Closed
xyqiao opened this issue Nov 5, 2019 · 3 comments

Comments

@xyqiao
Copy link

@xyqiao xyqiao commented Nov 5, 2019

keyWordsChange() {
    const { keywords } = this
    const query: Query = get(this, '$route.query')
    if (keywords) {
        query.keywords = keywords
    } else {
        delete query.keywords
    }
    this.$router.replace({
        ...this.$route,
        query,
    })
}

image

@vue-bot

This comment has been minimized.

Copy link

@vue-bot vue-bot commented Nov 5, 2019

Hello, thank you for taking time filling this issue!

However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).

I hope to see your helper-created issue very soon!

@vue-bot vue-bot closed this Nov 5, 2019
@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Nov 5, 2019

Tye route object is read-only. Make sure to create a copy instead of deleting from query

@itibbers

This comment has been minimized.

Copy link

@itibbers itibbers commented Nov 14, 2019

let query  = Object.assign({}, this.$route.query)
// ...
this.$router.push({ query })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.