]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: beforeRouteUpdate (#1255)
author1sm <31946591+1sm23@users.noreply.github.com>
Wed, 22 Dec 2021 09:58:23 +0000 (17:58 +0800)
committerGitHub <noreply@github.com>
Wed, 22 Dec 2021 09:58:23 +0000 (10:58 +0100)
docs/zh/guide/advanced/composition-api.md

index a06f868815c2f82626c552b6c9b891ab3992ba19..060e97de14c5ed76d6476b091e0f1cad6a1e1040 100644 (file)
@@ -69,7 +69,7 @@ export default {
 
     const userData = ref()
 
-    // 与 beforeRouteLeave 相同,无法访问 `this`
+    // 与 beforeRouteUpdate 相同,无法访问 `this`
     onBeforeRouteUpdate(async (to, from) => {
       //仅当 id 更改时才获取用户,例如仅 query 或 hash 值已更改
       if (to.params.id !== from.params.id) {