Skip to content

Commit

Permalink
docs: beforeRouteUpdate (vuejs#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
1sm23 authored Dec 22, 2021
1 parent 80e76b5 commit edfd4e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/zh/guide/advanced/composition-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit edfd4e0

Please sign in to comment.