Skip to content

Commit

Permalink
docs: add keepQuery desc
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Mar 25, 2024
1 parent ef36fb0 commit 106f534
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/docs/docs/guides/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,17 @@ export default {
}
```

访问 `/` 会跳转到 `/list`,并由 `src/pages/list` 文件进行渲染。
访问 `/` 会跳转到 `/list`

重定向时,默认不会携带原 url 的查询参数,如需保持原参数,添加 `keepQuery` 选项即可:

```ts
routes: [
{ path: '/', redirect: '/list', keepQuery: true },

// 注:若你需在跳转时处理参数,可以自行实现一个跳转组件
]
```

### wrappers

Expand Down

0 comments on commit 106f534

Please sign in to comment.