Skip to content

Commit 3827f16

Browse files
authored
update ja docs (#1733)
* add notes about params + path NOTE: pick up from 86ca8a9 * translate previous commit * add more navigation note * translate previous commit * update IIS NOTE: pick up from 2393f65 * update translation
1 parent 69d912c commit 3827f16

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

Diff for: docs/ja/essentials/history-mode.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ Node.js/Express では [connect-history-api-fallback middleware](https://github.
7070

7171
#### Internet Information Services (IIS)
7272

73+
1. [IIS UrlRewrite](https://www.iis.net/downloads/microsoft/url-rewrite) をインストール
74+
2. 以下によるサイトのルートディレクトリに `web.config` ファイルを作成
75+
7376
``` xml
7477
<?xml version="1.0" encoding="UTF-8"?>
7578
<configuration>
@@ -82,17 +85,10 @@ Node.js/Express では [connect-history-api-fallback middleware](https://github.
8285
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
8386
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
8487
</conditions>
85-
<action type="Rewrite" url="index.html" />
88+
<action type="Rewrite" url="/" />
8689
</rule>
8790
</rules>
8891
</rewrite>
89-
<httpErrors>
90-
<remove statusCode="404" subStatusCode="-1" />
91-
<remove statusCode="500" subStatusCode="-1" />
92-
<error statusCode="404" path="/survey/notfound" responseMode="ExecuteURL" />
93-
<error statusCode="500" path="/survey/error" responseMode="ExecuteURL" />
94-
</httpErrors>
95-
<modules runAllManagedModulesForAllRequests="true"/>
9692
</system.webServer>
9793
</configuration>
9894
```

Diff for: docs/ja/essentials/navigation.md

+15
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,23 @@ router.push({ name: 'user', params: { userId: 123 }})
3131
router.push({ path: 'register', query: { plan: 'private' }})
3232
```
3333

34+
**注意**: `params` は、上記例に示すように、`path` が提供されている場合は無視されます。これは `query` に対するケースとは異なります。
35+
代わりに、ルートの `name` か任意のパラメータを付与した `path` 全体を手動で指定する必要があります:
36+
37+
```js
38+
const userId = 123
39+
router.push({ name: 'user', params: { userId }}) // -> /user/123
40+
router.push({ path: `/user/${userId}` }) // -> /user/123
41+
// これは動作"しません"
42+
router.push({ path: '/user', params: { userId }}) // -> /user
43+
```
44+
45+
同じルールが、`router-link` コンポーネントの `to` プロパティに対して適用されます。
46+
3447
2.2.0 以降では、必要に応じて、第 2 引数と第 3 引数として `router.push` または `router.replace``onComplete``onAbort` コールバックを指定します。これらのコールバックは、ナビゲーションが正常に完了したとき(すべての非同期フックが解決された後)に呼び出されるか、またはそれぞれ中止されます(現在のナビゲーションが終了する前に同じルートまたは別のルートにナビゲートされた)
3548

49+
**注意:** ルートの行き先が現在のルートと同じで、かつパラメータのみが変更されている場合(例: `/users/1` -> `/users/2` のようにあるプロファイルから他へ)、変更(例: ユーザー情報の取得など)に反応するために[beforeRouteUpdate](./dynamic-matching.html#パラメーター変更の検知) を使用しなければなりません。
50+
3651
#### `router.replace(location, onComplete?, onAbort?)`
3752

3853
これは `router.push` のように動作しますが、異なる点は新しい history エントリを追加しないで遷移することです。この名前から推定されるように、現在のエントリを置換します。

0 commit comments

Comments
 (0)