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

关于router用query传参时的格式问题 #2630

Closed
yangzhuq opened this Issue Feb 27, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@yangzhuq
Copy link

yangzhuq commented Feb 27, 2019

Version

3.0.1

Reproduction link

https://jsbin.com/yujepuwamo/edit?html

Steps to reproduce

当使用 如下方法传递参数时
this.$router.push({
path: "/xxx",
query: {
id: “yyy”
}
});

What is expected?

按照URL的标准格式 将会跳转至如下格式
scheme://host:port/path?id=yyy/#/xxx

What is actually happening?

然而生成路径时是如下格式
scheme://host:port/path/#/xxx?id=yyy


这样的结果是在URL不符合路径传参的规则,当然这不影响用 this.$route.query的方法拿到所要传递的参数。但是当用window.location.search的方法时会发现参数被存放在hash的内容了。是否能统一格式呢?

@posva

This comment has been minimized.

Copy link
Member

posva commented Feb 27, 2019

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

@posva posva closed this Feb 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.