We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 149aefa commit f4289d3Copy full SHA for f4289d3
packages/docs/guide/essentials/redirect-and-alias.md
@@ -54,9 +54,7 @@ const routes = [
54
path: '/users/:id/posts',
55
redirect: to => {
56
// the function receives the target route as the argument
57
- // a relative location doesn't start with `/`
58
- // or { path: 'profile'}
59
- return 'profile'
+ return to.path.replace(/posts$/, 'profile')
60
},
61
62
]
packages/docs/zh/guide/essentials/redirect-and-alias.md
// 该函数接收目标路由作为参数
- // 相对位置不以`/`开头
- // 或 { path: 'profile'}
0 commit comments