-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Update ja docs #1412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ja docs #1412
Conversation
NOTE: pick up from vuejs@c4ff27a
NOTE: pick up from vuejs@26c0f16
NOTE: pick up from vuejs@7ca6897
NOTE: pick up from vuejs@23991ef
NOTE: pick up from vuejs@bce38f8
@@ -2,7 +2,7 @@ | |||
|
|||
この名前が示すように、 `vue-router` によって提供されるナビゲーションガードは、リダイレクトもしくはキャンセルによって遷移をガードするために主に使用されます。ルートナビゲーション処理 (グローバル、ルート単位、コンポーネント内) をフックする多くの方法があります。 | |||
|
|||
**パラメータまたはクエリの変更はナビゲーションガードをトリガーしない** ということを覚えておいてください。単純にそれらの変更を対応するために [`$route` オブジェクトを監視します](../essentials/dynamic-matching.md#reacting-to-params-changes)。 | |||
**パラメータまたはクエリの変更は enter/leave ナビゲーションガードをトリガーしない** ということを覚えておいてください。それらの変更を対応するために [`$route` オブジェクトを監視する](../essentials/dynamic-matching.md#reacting-to-params-changes)、またはコンポーネント内ガード `beforeRouteUpdate` を使用するか、どちらかでできます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かいですが、
- それらの変更を対応するために -> それらの変更に対応するために
- ...を使用するか、どちらかでできます。 -> ...を使用するかの、どちらかができます。
が自然かなと感じました。
|
||
> New in 2.5.0 | ||
|
||
2.5.0 以降では、`router.beforeResolve` によってグローバルガードを登録できます。これは `router.beforeEach` に似ていますが、**すべてのコンポーネント内ガードと非同期ルートコンポーネントが解決された後**、ナビゲーションが解決される直ゼインに解決ガードが呼び出されるという違いがあります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
直ゼイン -> 直前
1. ナビゲーションがトリガされる | ||
2. 非アクティブ化されたコンポーネントで leave ガードを呼ぶ | ||
3. グローバル `beforeEach` ガードを呼ぶ | ||
4. 再利用コンポーネント (2.2 以降) で `beforeRouteUpdate` ガードを呼ぶ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここの (2.2 以降) はこの文全体にかかっていると思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「再利用されるコンポーネント」の方がより具体的ですかね?
2. 非アクティブ化されたコンポーネントで leave ガードを呼ぶ | ||
3. グローバル `beforeEach` ガードを呼ぶ | ||
4. 再利用コンポーネント (2.2 以降) で `beforeRouteUpdate` ガードを呼ぶ | ||
5. ルート設定 `beforeEnter` を呼ぶ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「ルート設定内の」まで説明するほうが親切かもです?
5. ルート設定 `beforeEnter` を呼ぶ | ||
6. 非同期ルートコンポーネントを解決する | ||
7. アクティブ化されたコンポーネントで `beforeRouteEnter` を呼ぶ | ||
8. グローバル `beforeResolve` ガード (2.5 以降) を呼ぶ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも (2.5 以降) は全体にかかっているように見えます。
docs/ja/api/options.md
Outdated
@@ -66,7 +76,7 @@ | |||
) => { x: number, y: number } | { selector: string } | ?{} | |||
``` | |||
|
|||
より詳細ついては [スクロールの振る舞い](../advanced/scroll-behavior.md) をご参照ください。 | |||
より詳細ついては [スクロールの振る舞い](../advanced/scroll-behavior.md) を参照してください。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今回の変更じゃないですが、「より詳細については」にしたほうが良さそうですね。
const User = { | ||
template: '...', | ||
beforeRouteUpdate (to, from, next) { | ||
// ルート変更にリアクティブにする... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここの react は reactive property の react とは違う意味で普通に「反応する」という意味だと思うので、「ルート変更に反応する...」でいかがでしょうか?
レビューありがとうございます! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 💯
No description provided.