]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: update links to the core Vue docs (#2055)
authorskirtle <65301168+skirtles-code@users.noreply.github.com>
Thu, 23 Nov 2023 08:28:22 +0000 (08:28 +0000)
committerGitHub <noreply@github.com>
Thu, 23 Nov 2023 08:28:22 +0000 (09:28 +0100)
packages/docs/guide/advanced/composition-api.md
packages/docs/guide/advanced/lazy-loading.md
packages/docs/guide/advanced/navigation-guards.md
packages/docs/guide/advanced/transitions.md
packages/docs/guide/essentials/history-mode.md
packages/docs/zh/guide/advanced/composition-api.md
packages/docs/zh/guide/advanced/lazy-loading.md
packages/docs/zh/guide/advanced/navigation-guards.md
packages/docs/zh/guide/advanced/transitions.md
packages/docs/zh/guide/essentials/history-mode.md
packages/docs/zh/introduction.md

index dd1d50aa8b60d71f97eeea84b01a7aff8ab9d8e5..3e9213f7841e59db00b7f007d9180a8b5d9172e9 100644 (file)
@@ -5,7 +5,7 @@
   title="Learn how to use Vue Router with the composition API"
 />
 
-The introduction of `setup` and Vue's [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html), open up new possibilities but to be able to get the full potential out of Vue Router, we will need to use a few new functions to replace access to `this` and in-component navigation guards.
+The introduction of `setup` and Vue's [Composition API](https://vuejs.org/guide/extras/composition-api-faq.html), open up new possibilities but to be able to get the full potential out of Vue Router, we will need to use a few new functions to replace access to `this` and in-component navigation guards.
 
 ## Accessing the Router and current Route inside `setup`
 
index 1909d3d36f94755d07cbe9d3c371509f564a1e68..d33099c88d685c209cad54571b4c3cfa931ef547 100644 (file)
@@ -37,7 +37,7 @@ const UserDetails = () =>
 In general, it's a good idea **to always use dynamic imports** for all your routes.
 
 ::: tip Note
-Do **not** use [Async components](https://v3.vuejs.org/guide/component-dynamic-async.html#async-components) for routes. Async components can still be used inside route components but route component themselves are just dynamic imports.
+Do **not** use [Async components](https://vuejs.org/guide/components/async.html) for routes. Async components can still be used inside route components but route component themselves are just dynamic imports.
 :::
 
 When using a bundler like webpack, this will automatically benefit from [code splitting](https://webpack.js.org/guides/code-splitting/)
index fbad80c3ab0729e3ed96774e03d94116971627eb..1d0067f60393bb35ecfd6362f01e6deeb11fab8a 100644 (file)
@@ -264,7 +264,7 @@ beforeRouteLeave (to, from) {
 
 ### Using the composition API
 
-If you are writing your component using the [composition API and a `setup` function](https://v3.vuejs.org/guide/composition-api-setup.html#setup), you can add update and leave guards through `onBeforeRouteUpdate` and `onBeforeRouteLeave` respectively. Please refer to the [Composition API section](./composition-api.md#navigation-guards) for more details.
+If you are writing your component using the [composition API and a `setup` function](https://vuejs.org/api/composition-api-setup.html), you can add update and leave guards through `onBeforeRouteUpdate` and `onBeforeRouteLeave` respectively. Please refer to the [Composition API section](./composition-api.md#navigation-guards) for more details.
 
 ## The Full Navigation Resolution Flow
 
index f49c5ae9e2ba634c846a640e31a618f9c9aabb17..613256ab04830f45621b8c4a958c3e0ac2a8b3db 100644 (file)
@@ -15,7 +15,7 @@ In order to use transitions on your route components and animate navigations, yo
 </router-view>
 ```
 
-[All transition APIs](https://v3.vuejs.org/guide/transitions-enterleave.html) work the same here.
+[All transition APIs](https://vuejs.org/guide/built-ins/transition.html) work the same here.
 
 ## Per-Route Transition
 
@@ -70,7 +70,7 @@ router.afterEach((to, from) => {
 
 ## Forcing a transition between reused views
 
-Vue might automatically reuse components that look alike, avoiding any transition. Fortunately, it is possible [to add a `key` attribute](https://v3.vuejs.org/api/special-attributes.html#key) to force transitions. This also allows you to trigger transitions while staying on the same route with different params:
+Vue might automatically reuse components that look alike, avoiding any transition. Fortunately, it is possible [to add a `key` attribute](https://vuejs.org/api/built-in-special-attributes.html#key) to force transitions. This also allows you to trigger transitions while staying on the same route with different params:
 
 ```vue
 <router-view v-slot="{ Component, route }">
index 11e9e9994df55514e91b5aab173ad1b886e1b26c..8cb720e93b6791e56cb4d4260e4192d2d6f269fb 100644 (file)
@@ -214,4 +214,4 @@ const router = createRouter({
 })
 ```
 
-Alternatively, if you are using a Node.js server, you can implement the fallback by using the router on the server side to match the incoming URL and respond with 404 if no route is matched. Check out the [Vue server side rendering documentation](https://v3.vuejs.org/guide/ssr/introduction.html#what-is-server-side-rendering-ssr) for more information.
+Alternatively, if you are using a Node.js server, you can implement the fallback by using the router on the server side to match the incoming URL and respond with 404 if no route is matched. Check out the [Vue server side rendering documentation](https://vuejs.org/guide/scaling-up/ssr.html) for more information.
index 399612e7146a2e2275010e14f07937e3a2246eca..da2e9b82144c09942a74a52f05969296b58906d5 100644 (file)
@@ -5,7 +5,7 @@
   title="Learn how to use Vue Router with the composition API"
 />
 
-引入 `setup` 和 Vue 的[组合式 API](https://v3.vuejs.org/guide/composition-api-introduction.html),开辟了新的可能性,但要想充分发挥 Vue Router 的潜力,我们需要使用一些新的函数来代替访问 `this` 和组件内导航守卫。
+引入 `setup` 和 Vue 的[组合式 API](https://cn.vuejs.org/guide/extras/composition-api-faq.html),开辟了新的可能性,但要想充分发挥 Vue Router 的潜力,我们需要使用一些新的函数来代替访问 `this` 和组件内导航守卫。
 
 ## 在 `setup` 中访问路由和当前路由
 
index abb4d6aa570b067f1bfd62dd63776f14b35cd0ce..c4e0dffdf44d6db0b7cd67b801ba81bc8bc0423a 100644 (file)
@@ -33,7 +33,7 @@ const UserDetails = () =>
 一般来说,对所有的路由**都使用动态导入**是个好主意。
 
 ::: tip 注意
-**不要**在路由中使用[异步组件](https://v3.vuejs.org/guide/component-dynamic-async.html#async-components)。异步组件仍然可以在路由组件中使用,但路由组件本身就是动态导入的。
+**不要**在路由中使用[异步组件](https://cn.vuejs.org/guide/components/async.html)。异步组件仍然可以在路由组件中使用,但路由组件本身就是动态导入的。
 :::
 
 如果你使用的是 webpack 之类的打包器,它将自动从[代码分割](https://webpack.js.org/guides/code-splitting/)中受益。
index ddc5baead23217bb69c3a42d10fa65fd8ed76fe5..7767b38ca2c60a6a06d6dcb674d0ec05cfa43c90 100644 (file)
@@ -246,7 +246,7 @@ beforeRouteLeave (to, from) {
 
 ### 使用组合 API
 
-如果你正在使用[组合 API 和 `setup` 函数](https://v3.vuejs.org/guide/composition-api-setup.html#setup)来编写组件,你可以通过 `onBeforeRouteUpdate` 和 `onBeforeRouteLeave` 分别添加 update 和 leave 守卫。 请参考[组合 API 部分](./composition-api.md#导航守卫)以获得更多细节。
+如果你正在使用[组合 API 和 `setup` 函数](https://cn.vuejs.org/api/composition-api-setup.html)来编写组件,你可以通过 `onBeforeRouteUpdate` 和 `onBeforeRouteLeave` 分别添加 update 和 leave 守卫。 请参考[组合 API 部分](./composition-api.md#导航守卫)以获得更多细节。
 
 ## 完整的导航解析流程
 
index 19ddf9b6fae3456289af4cc66cb0dfa7594e570f..d9b23d7eb4e5a755a823594c1ff69ebfb251fee6 100644 (file)
@@ -15,7 +15,7 @@
 </router-view>
 ```
 
-[Transition 的 API](https://v3.vuejs.org/guide/transitions-enterleave.html) 在这里同样适用。
+[Transition 的 API](https://cn.vuejs.org/guide/built-ins/transition.html) 在这里同样适用。
 
 ## 单个路由的过渡
 
@@ -70,7 +70,7 @@ router.afterEach((to, from) => {
 
 ## 强制在复用的视图之间进行过渡
 
-Vue 可能会自动复用看起来相似的组件,从而忽略了任何过渡。幸运的是,可以[添加一个 `key` 属性](https://v3.vuejs.org/api/special-attributes.html#key)来强制过渡。这也允许你在相同路由上使用不同的参数触发过渡:
+Vue 可能会自动复用看起来相似的组件,从而忽略了任何过渡。幸运的是,可以[添加一个 `key` 属性](https://cn.vuejs.org/api/built-in-special-attributes.html#key)来强制过渡。这也允许你在相同路由上使用不同的参数触发过渡:
 
 ```vue
 <router-view v-slot="{ Component, route }">
index 71f4fa38cba003d7788fbc4918b5c53b0db6d394..8334552af794ed4cb0ff7b7bc8a0081f692536a9 100644 (file)
@@ -197,4 +197,4 @@ const router = createRouter({
 })
 ```
 
-另外,如果你使用的是 Node.js 服务器,你可以通过在服务器端使用路由器来匹配传入的 URL,如果没有匹配到路由,则用 404 来响应,从而实现回退。查看 [Vue 服务器端渲染文档](https://v3.cn.vuejs.org/guide/ssr/introduction.html#what-is-server-side-rendering-ssr)了解更多信息。
+另外,如果你使用的是 Node.js 服务器,你可以通过在服务器端使用路由器来匹配传入的 URL,如果没有匹配到路由,则用 404 来响应,从而实现回退。查看 [Vue 服务器端渲染文档](https://cn.vuejs.org/guide/scaling-up/ssr.html)了解更多信息。
index d0fdc90480195df30094abad90c1f83c9c827fdd..701303c48f81eb5b2b4393d341598932caec7f8c 100644 (file)
@@ -5,7 +5,7 @@
   title="Learn how to build powerful Single Page Applications with the Vue Router on Vue School"
 />
 
-Vue Router 是 [Vue.js](https://vuejs.org) 的官方路由。它与 Vue.js 核心深度集成,让用 Vue.js 构建单页应用变得轻而易举。功能包括:
+Vue Router 是 [Vue.js](https://cn.vuejs.org/) 的官方路由。它与 Vue.js 核心深度集成,让用 Vue.js 构建单页应用变得轻而易举。功能包括:
 
 - 嵌套路由映射
 - 动态路由选择