We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
组件中使用router进行路由跳转会丢失query参数,如下的代码所示,实际跳过去的页面后面没有query的参数,可以通过下面的复现链接点击页面中的测试按钮查看效果。不知道是从哪个版本就失效了,之前一直是有用的。
测试
<template> <button style="width: 200px; height: 30px" @click="testClick">测试</button> </template> <script setup lang="ts"> import { useRouter } from 'vue-router'; const router = useRouter(); function testClick() { router.push({ path: '/test', query: { type: '123', }, }); } </script>
https://stackblitz.com/edit/vuepress-auhtn4
pnpm
MacOS 13.5.2 Chrome 122.0.6261.112
The text was updated successfully, but these errors were encountered:
这里路由发生了重定向,在redirectedFrom中可以拿到query
Sorry, something went wrong.
可以不需要重定向吗
This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 7 days.
stale
fix(client): fix route navigation, close #1514
9ecfa59
fix(client): keep full path during route navigation (close #1514) (#1527
e6455e0
)
Mister-Hope
Successfully merging a pull request may close this issue.
Description
组件中使用router进行路由跳转会丢失query参数,如下的代码所示,实际跳过去的页面后面没有query的参数,可以通过下面的复现链接点击页面中的
测试
按钮查看效果。不知道是从哪个版本就失效了,之前一直是有用的。Reproduction
https://stackblitz.com/edit/vuepress-auhtn4
Used Package Manager
pnpm
System Info
The text was updated successfully, but these errors were encountered: