This repository was archived by the owner on Sep 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +183
-22
lines changed Expand file tree Collapse file tree 8 files changed +183
-22
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ description: Display the page components inside a layout.
7
7
8
8
> This component is used only in [ layouts] ( /guide/views#layouts ) to display the page components.
9
9
10
- ** Props** :
11
- - nuxtChildKey: ` string `
12
- - This prop will be set to ` <router-view/> ` , useful to make transitions inside a dynamic page and different route.
13
- - Default: ` $route.fullPath `
14
-
15
10
Example (` layouts/default.vue ` ):
16
11
17
12
``` html
@@ -25,3 +20,41 @@ Example (`layouts/default.vue`):
25
20
```
26
21
27
22
To see an example, take a look at the [ layouts example] ( /examples/layouts ) .
23
+
24
+ ** Props** :
25
+
26
+ - nuxtChildKey: ` string `
27
+ - This prop will be set to ` <router-view/> ` , useful to make transitions inside a dynamic page and different route.
28
+ - Default: ` $route.path `
29
+
30
+ There are 3 ways to handle internal ` key ` prop of ` <router-view/> ` .
31
+
32
+ 1 . ` nuxtChildKey ` prop
33
+
34
+ ``` html
35
+ <template >
36
+ <div >
37
+ <nuxt :nuxt-child-key =" someKey" />
38
+ </div >
39
+ </template >
40
+ ```
41
+
42
+ 2 . ` key ` option in page components: ` string ` or ` function `
43
+
44
+ ``` js
45
+ export default {
46
+ key (route ) {
47
+ return route .fullPath
48
+ }
49
+ }
50
+ ```
51
+
52
+ 3 . ` watchQuery ` option in page components: ` boolean ` or ` string[] `
53
+
54
+ Queries specified in [ watchQuery] ( /api/pages-watchquery ) option will be considered on building the key. If ` watchQuery ` is ` true ` , ` fullPath ` is used.
55
+
56
+ - name: ` string ` (_ introduced with Nuxt v2.4.0_ )
57
+ - This prop will be set to ` <router-view/> ` , used to render named-view of page component.
58
+ - Default: ` default `
59
+
60
+ To see an example, take a look at the [ named-views example] ( /examples/named-views ) .
Original file line number Diff line number Diff line change @@ -7,12 +7,6 @@ description: Display the page components inside a layout.
7
7
8
8
> This component is used only in [ layouts] ( /guide/views#layouts ) to display the page components.
9
9
10
- ** Props** :
11
-
12
- - nuxtChildKey: ` string `
13
- - This prop will be set to ` <router-view/> ` , useful to make transitions inside a dynamic page and different route.
14
- - Default: ` $route.fullPath `
15
-
16
10
Example (` layouts/default.vue ` ):
17
11
18
12
``` html
@@ -27,6 +21,38 @@ Example (`layouts/default.vue`):
27
21
28
22
To see an example, take a look at the [ layouts example] ( /examples/layouts ) .
29
23
24
+ ** Props** :
25
+
26
+ - nuxtChildKey: ` string `
27
+ - This prop will be set to ` <router-view/> ` , useful to make transitions inside a dynamic page and different route.
28
+ - Default: ` $route.path `
29
+
30
+ There are 3 ways to handle internal ` key ` prop of ` <router-view/> ` .
31
+
32
+ 1 . ` nuxtChildKey ` prop
33
+
34
+ ``` html
35
+ <template >
36
+ <div >
37
+ <nuxt :nuxt-child-key =" someKey" />
38
+ </div >
39
+ </template >
40
+ ```
41
+
42
+ 2 . ` key ` option in page components: ` string ` or ` function `
43
+
44
+ ``` js
45
+ export default {
46
+ key (route ) {
47
+ return route .fullPath
48
+ }
49
+ }
50
+ ```
51
+
52
+ 3 . ` watchQuery ` option in page components: ` boolean ` or ` string[] `
53
+
54
+ Queries specified in [ watchQuery] ( /api/pages-watchquery ) option will be considered on building the key. If ` watchQuery ` is ` true ` , ` fullPath ` is used.
55
+
30
56
- name: ` string ` (_ introduced with Nuxt v2.4.0_ )
31
57
- This prop will be set to ` <router-view/> ` , used to render named-view of page component.
32
58
- Default: ` default `
Original file line number Diff line number Diff line change @@ -20,3 +20,41 @@ Example (`layouts/default.vue`):
20
20
```
21
21
22
22
To see an example, take a look at the [ layouts example] ( /examples/layouts ) .
23
+
24
+ ** Props** :
25
+
26
+ - nuxtChildKey: ` string `
27
+ - This prop will be set to ` <router-view/> ` , useful to make transitions inside a dynamic page and different route.
28
+ - Default: ` $route.path `
29
+
30
+ There are 3 ways to handle internal ` key ` prop of ` <router-view/> ` .
31
+
32
+ 1 . ` nuxtChildKey ` prop
33
+
34
+ ``` html
35
+ <template >
36
+ <div >
37
+ <nuxt :nuxt-child-key =" someKey" />
38
+ </div >
39
+ </template >
40
+ ```
41
+
42
+ 2 . ` key ` option in page components: ` string ` or ` function `
43
+
44
+ ``` js
45
+ export default {
46
+ key (route ) {
47
+ return route .fullPath
48
+ }
49
+ }
50
+ ```
51
+
52
+ 3 . ` watchQuery ` option in page components: ` boolean ` or ` string[] `
53
+
54
+ Queries specified in [ watchQuery] ( /api/pages-watchquery ) option will be considered on building the key. If ` watchQuery ` is ` true ` , ` fullPath ` is used.
55
+
56
+ - name: ` string ` (_ introduced with Nuxt v2.4.0_ )
57
+ - This prop will be set to ` <router-view/> ` , used to render named-view of page component.
58
+ - Default: ` default `
59
+
60
+ To see an example, take a look at the [ named-views example] ( /examples/named-views ) .
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ description: Affiche un composant de page à l'intérieur d'une mise en page.
10
10
** Props** :
11
11
- nuxtChildKey : ` string `
12
12
- Cette prop va être appliquée à ` <router-view/> ` . Utile pour faire des transitions à l'intérieur d'une page dynamique et d'une route différente.
13
- - par défaut : ` $route.fullPath `
13
+ - par défaut : ` $route.path `
14
14
15
15
Exemple (` layouts/default.vue ` ) :
16
16
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ description: Menampilkan komponen halaman di dalam layout
11
11
12
12
- nuxtChildKey: ` string `
13
13
- Prop ini di-set ke ` <router-view/> ` , berguna untuk membuat transisi di dalam halaman yang dinamis dan rute yang berbeda.
14
- - Default: ` $route.fullPath `
14
+ - Default: ` $route.path `
15
15
16
16
Contoh (` layouts/default.vue ` ):
17
17
Original file line number Diff line number Diff line change @@ -7,12 +7,6 @@ description: レイアウト内でページコンポーネントを表示しま
7
7
8
8
> このコンポーネントは [ レイアウト] ( /guide/views#%E3%83%AC%E3%82%A4%E3%82%A2%E3%82%A6%E3%83%88 ) 内でのみ、ページコンポーネントを表示するために使われます。
9
9
10
- ** Props** :
11
-
12
- - nuxt 子キー:` string `
13
- - この prop は ` <router-view/> ` に設定され、動的なページと異なるルートの中で遷移させるのに便利です
14
- - デフォルト: ` $route.fullPath `
15
-
16
10
例(` layouts/default.vue ` ):
17
11
18
12
``` html
@@ -27,8 +21,40 @@ description: レイアウト内でページコンポーネントを表示しま
27
21
28
22
実際の例を見たいときは [ レイアウトの例] ( /examples/layouts ) を参照してください。
29
23
30
- - 名前:` string ` (_ Nuxt v2.4.0で導入されました_ )
31
- - この prop は ` <router-view/> ` に設定され、ページコンポーネントの名前付きビューをレンダリングするのに利用されます
24
+ ** Props** :
25
+
26
+ - nuxtChildKey:` string `
27
+ - この prop は ` <router-view/> ` に設定され、動的なページと異なるルートの中で遷移させるのに便利です
28
+ - デフォルト: ` $route.path `
29
+
30
+ ` <router-view/> ` の ` key ` prop を操作する方法は3つあります。
31
+
32
+ 1 . ` nuxtChildKey ` prop
33
+
34
+ ``` html
35
+ <template >
36
+ <div >
37
+ <nuxt :nuxt-child-key =" someKey" />
38
+ </div >
39
+ </template >
40
+ ```
41
+
42
+ 2 . 各ページコンポーネントの ` key ` オプション: ` string ` or ` function `
43
+
44
+ ``` js
45
+ export default {
46
+ key (route ) {
47
+ return route .fullPath
48
+ }
49
+ }
50
+ ```
51
+
52
+ 3 . 各ページコンポーネントの ` watchQuery ` オプション: ` boolean ` or ` string[] `
53
+
54
+ [ watchQuery] ( /api/pages-watchquery ) に設定されたクエリはキーを生成するとき考慮されます。 ` watchQuery ` が ` true ` の場合は ` fullPath ` が使われます。
55
+
56
+ - name:` string ` (_ Nuxt v2.4.0で導入されました_ )
57
+ - この prop は ` <router-view/> ` に設定され、ページコンポーネントの名前付きビューをレンダリングするのに利用されます。
32
58
- デフォルト: ` default `
33
59
34
60
実際の例を見たいときは [ 名前付きビューの例] ( /examples/named-views ) を参照してください。
Original file line number Diff line number Diff line change @@ -20,3 +20,41 @@ description: 레이아웃 내부의 페이지 컴포넌트를 보여줍니다.
20
20
```
21
21
22
22
[ layouts example] ( /examples/layouts ) 에서 예제를 보실 수 있습니다.
23
+
24
+ ** Props** :
25
+
26
+ - nuxtChildKey: ` string `
27
+ - 이 속성은 ` <router-view/> ` 에 ` key ` 속성으로 설정됩니다. 동적 페이지에서 여러 라우트간의 트랜지션을 만드는 경우 유용합니다.
28
+ - 기본값: ` $route.path `
29
+
30
+ ` <router-view/> ` 에 ` key ` 속성을 설정하는 방법은 3가지가 있습니다.
31
+
32
+ 1 . ` nuxtChildKey ` 속성
33
+
34
+ ``` html
35
+ <template >
36
+ <div >
37
+ <nuxt :nuxt-child-key =" someKey" />
38
+ </div >
39
+ </template >
40
+ ```
41
+
42
+ 2 . 각 페이지 컴포넌트의 ` key ` 옵션: ` string ` or ` function `
43
+
44
+ ``` js
45
+ export default {
46
+ key (route ) {
47
+ return route .fullPath
48
+ }
49
+ }
50
+ ```
51
+
52
+ 3 . 각 페이지 컴포넌트의 ` watchQuery ` 옵션: ` boolean ` or ` string[] `
53
+
54
+ [ watchQuery] ( /api/pages-watchquery ) 옵션에 설정한 쿼리는 키를 생성할 때 고려됩니다. 만약 ` watchQuery ` 가 ` true ` 라면 ` fullPath ` 를 사용하게 됩니다.
55
+
56
+ - name: ` string ` (_ introduced with Nuxt v2.4.0_ )
57
+ - 이 속성은 ` <router-view/> ` 의 속성으로 설정됩니다. 페이지 컴포넌트의 named-view를 렌더링 하는데 사용됩니다.
58
+ - 기본값: ` default `
59
+
60
+ [ named-views example] ( /examples/named-views ) 에서 예제를 보실 수 있습니다.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ description: 该组件用于在布局中显示页面组件(即非布局内容
10
10
** Props** :
11
11
- nuxtChildKey: ` string `
12
12
- 此prop将设置为` <router-view /> ` ,可用于在动态页面和不同路径内进行转换。
13
- - 默认: ` $route.fullPath `
13
+ - 默认: ` $route.path `
14
14
15
15
例如 (` layouts/default.vue ` ):
16
16
You can’t perform that action at this time.
0 commit comments