@@ -3,63 +3,63 @@ badges:
33 - breaking
44---
55
6- # Slots Unification <MigrationBadges :badges =" $frontmatter.badges " />
6+ # スロットの統合 <MigrationBadges :badges =" $frontmatter.badges " />
77
8- ## Overview
8+ ## 概要
99
10- This change unifies normal and scoped slots in 3.x.
10+ この変更により、 3.x の通常のスロットとスコープ付きスロットが統合されます。
1111
12- Here is a quick summary of what has changed :
12+ 変更点の概要は次のとおりです :
1313
14- - ` this.$slots ` now exposes slots as functions
15- - ** BREAKING ** : ` this.$scopedSlots ` is removed
14+ - ` this.$slots ` はスロットを関数として公開するようになりました
15+ - ** 破壊的変更 ** : ` this.$scopedSlots ` が削除されました
1616
17- For more information, read on !
17+ 詳細については、以下をお読みください !
1818
19- ## 2.x Syntax
19+ ## 2.x 構文
2020
21- When using the render function, i.e., ` h ` , 2.x used to define the ` slot ` data property on the content nodes.
21+ render関数を使用する場合、つまり、 ` h ` は、 2.x ではコンテンツノードの ` slot ` データプロパティを定義するために使用されます。
2222
2323``` js
24- // 2.x Syntax
24+ // 2.x 構文
2525h (LayoutComponent, [
2626 h (' div' , { slot: ' header' }, this .header ),
2727 h (' div' , { slot: ' content' }, this .content )
2828])
2929```
3030
31- In addition, when referencing scoped slots, they could be referenced using the following syntax :
31+ さらに、スコープ付きスロットを参照する場合、次の構文を使用して参照できます :
3232
3333``` js
34- // 2.x Syntax
34+ // 2.x 構文
3535this .$scopedSlots .header
3636```
3737
38- ## 3.x Syntax
38+ ## 3.x 構文
3939
40- In 3.x, slots are defined as children of the current node as an object :
40+ 3.x では、スロットはオブジェクトとしての現在のノードの子として定義されています :
4141
4242``` js
43- // 3.x Syntax
43+ // 3.x 構文
4444h (LayoutComponent, {}, {
4545 header : () => h (' div' , this .header ),
4646 content : () => h (' div' , this .content )
4747})
4848```
4949
50- And when you need to reference scoped slots programmatically, they are now unified into the ` $slots ` option.
50+ また、スコープ付きスロットをプログラムで参照する必要がある場合、それらは ` $slots ` オプションに統合されるようになりました。
5151
5252``` js
53- // 2.x Syntax
53+ // 2.x 構文
5454this .$scopedSlots .header
5555
56- // 3.x Syntax
56+ // 3.x 構文
5757this .$slots .header ()
5858```
5959
60- ## Migration Strategy
60+ ## 移行戦略
6161
62- A majority of the change has already been shipped in 2.6. As a result, the migration can happen in one step :
62+ 変更の大部分はすでに 2.6 で行われています。その結果、移行は1つのステップで実行できます :
6363
64- 1 . Replace all ` this.$scopedSlots ` occurrences with ` this.$slots ` in 3.x.
65- 2 . Replace all occurences of ` this.$slots.mySlot ` with ` this.$slots.mySlot() `
64+ 1 . 3.x の ` this.$scopedSlots ` の出現箇所をすべて ` this.$slots ` に置き換えます。
65+ 2 . ` this.$slots.mySlot ` のすべての出現箇所を ` this.$slots.mySlot() ` に置き換えます。
0 commit comments