Closed zhangyuhan2016 closed 3 months ago
Both open URL are not meant to be handled by this instance of the router since they are missing the base. If you end up having this behavior in production, it means your server is handling routes that do not have a based of alias-demo
, which would be a server misconfiguration. Since the router is not meant to handle these case, no specific result can be expected.
Version
3.6.5
Reproduction link
codesandbox.io
Steps to reproduce
Define route aliases and route base
See browser link
Normal : open URL ->
/alias/book?val=%E8%AE%A1%E7%AE%97
, browser display link/alias/book?val=%E8%AE%A1%E7%AE%97
。Error: open URL ->
/alias/book?val=%e8%ae%a1%e7%ae%97
, browser display link/alias-demo/alias/book?val=%E8%AE%A1%E7%AE%97
What is expected?
The expected parameter encoding will not affect the route base of the alias
What is actually happening?
The encoding of parameters will affect the route base of aliases
❤️ Thank you for any help you have provided.
vue@2.7.16 vue-router@3.6.5
online demo: https://codesandbox.io/p/devbox/vue-router-question-2xz3gv?file=%2Fsrc%2Frouter%2Findex.ts%3A9%2C7