未验证 提交 cdaf837f 编写于 作者: J JJ Kasper 提交者: GitHub

Update asPath to mention basePath/locale stripping (#18807)

Tweak `asPath` docs to mention `basePath` and `locale` will not be included in the value. 

Closes: https://github.com/vercel/next.js/issues/18782
上级 5e9d1aae
......@@ -43,7 +43,7 @@ The following is the definition of the `router` object returned by both [`useRou
- `pathname`: `String` - Current route. That is the path of the page in `/pages`
- `query`: `Object` - The query string parsed to an object. It will be an empty object during prerendering if the page doesn't have [data fetching requirements](/docs/basic-features/data-fetching.md). Defaults to `{}`
- `asPath`: `String` - Actual path (including the query) shown in the browser.
- `asPath`: `String` - The path (including the query) shown in the browser without the configured `basePath` or `locale`.
- `isFallback`: `boolean` - Whether the current page is in [fallback mode](/docs/basic-features/data-fetching#fallback-pages).
- `basePath`: `String` - The active [basePath](/docs/api-reference/next.config.js/basepath) (if enabled).
- `locale`: `String` - The active locale (if enabled).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册