diff --git a/packages/docs/zh/cookbook/migration-vuex.md b/packages/docs/zh/cookbook/migration-vuex.md index c29956118f..ce2ba06550 100644 --- a/packages/docs/zh/cookbook/migration-vuex.md +++ b/packages/docs/zh/cookbook/migration-vuex.md @@ -259,7 +259,7 @@ router.beforeEach((to, from, next) => { import { useAuthUserStore } from '@/stores/auth-user' router.beforeEach((to, from, next) => { - // 必须再函数内部使用 + // 必须在函数内部使用 const authUserStore = useAuthUserStore() if (authUserStore.loggedIn) next() else next('/login')