Skip to content

Commit

Permalink
fix(link): silence back navigations errors
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 6, 2019
1 parent 1381850 commit 59b6da3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { warn } from '../util/warn'
const toTypes: Array<Function> = [String, Object]
const eventTypes: Array<Function> = [String, Array]

const noop = () => {}

export default {
name: 'RouterLink',
props: {
Expand Down Expand Up @@ -68,9 +70,9 @@ export default {
const handler = e => {
if (guardEvent(e)) {
if (this.replace) {
router.replace(location)
router.replace(location, null, noop)
} else {
router.push(location)
router.push(location, null, noop)
}
}
}
Expand Down

1 comment on commit 59b6da3

@crawn420
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url's param marking by ?param=x&... is abandoned when redirected using router3.1.1
url中用get方式标记的参数在不加目标路由(#/path)的情况下被删除了
eg: ) http://127.0.0.1:8008?system=XX&token=Ab3K7suZ0Oc2B5-lFm_yY&dbtype=CC
redirect to
http://127.0.0.1:8008/#/login

Please sign in to comment.