Using the 'replace' method of VueRouter, router. replace ({path: 'url', query: {tab: 2, id:'1111 '}}), the parameters on the actual browser URL connection remain unchanged, but it can trigger the onBeforeRouteUpdate method #2370
Unanswered
liulinana
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
router. replace ({path: 'url', query: {tab: 2, id:'1111 '}})
Steps to reproduce the bug
初始化浏览器上的路由为/1111?tab=1
然后进行router.replace({ path: '/1111', query:{tab: 2, id: '111111111'} })进行更新url上的携带参数,实际上浏览器上的拼接参数无变化
Expected behavior
期望实际浏览器url上的参数变化成/1111?tab=2&id=111111111
Actual behavior
实际上浏览器上的拼接参数无变,仍然为就得url/1111?tab=1
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions