File tree 2 files changed +19
-8
lines changed
2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ Node.js/Express では [connect-history-api-fallback middleware](https://github.
70
70
71
71
#### Internet Information Services (IIS)
72
72
73
+ 1 . [ IIS UrlRewrite] ( https://www.iis.net/downloads/microsoft/url-rewrite ) をインストール
74
+ 2 . 以下によるサイトのルートディレクトリに ` web.config ` ファイルを作成
75
+
73
76
``` xml
74
77
<?xml version =" 1.0" encoding =" UTF-8" ?>
75
78
<configuration >
@@ -82,17 +85,10 @@ Node.js/Express では [connect-history-api-fallback middleware](https://github.
82
85
<add input =" {REQUEST_FILENAME}" matchType =" IsFile" negate =" true" />
83
86
<add input =" {REQUEST_FILENAME}" matchType =" IsDirectory" negate =" true" />
84
87
</conditions >
85
- <action type =" Rewrite" url =" index.html " />
88
+ <action type =" Rewrite" url =" / " />
86
89
</rule >
87
90
</rules >
88
91
</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" />
96
92
</system .webServer>
97
93
</configuration >
98
94
```
Original file line number Diff line number Diff line change @@ -31,8 +31,23 @@ router.push({ name: 'user', params: { userId: 123 }})
31
31
router .push ({ path: ' register' , query: { plan: ' private' }})
32
32
```
33
33
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
+
34
47
2.2.0 以降では、必要に応じて、第 2 引数と第 3 引数として ` router.push ` または ` router.replace ` に ` onComplete ` と ` onAbort ` コールバックを指定します。これらのコールバックは、ナビゲーションが正常に完了したとき(すべての非同期フックが解決された後)に呼び出されるか、またはそれぞれ中止されます(現在のナビゲーションが終了する前に同じルートまたは別のルートにナビゲートされた)
35
48
49
+ ** 注意:** ルートの行き先が現在のルートと同じで、かつパラメータのみが変更されている場合(例: ` /users/1 ` -> ` /users/2 ` のようにあるプロファイルから他へ)、変更(例: ユーザー情報の取得など)に反応するために[ beforeRouteUpdate] ( ./dynamic-matching.html#パラメーター変更の検知 ) を使用しなければなりません。
50
+
36
51
#### ` router.replace(location, onComplete?, onAbort?) `
37
52
38
53
これは ` router.push ` のように動作しますが、異なる点は新しい history エントリを追加しないで遷移することです。この名前から推定されるように、現在のエントリを置換します。
You can’t perform that action at this time.
0 commit comments