From 9129aa8e6530009bbffce4a792fd8ca59085ca11 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sun, 18 Apr 2021 01:40:55 +0900 Subject: [PATCH 1/2] fix: translate 'x.x syntax' --- src/guide/migration/slots-unification.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/guide/migration/slots-unification.md b/src/guide/migration/slots-unification.md index 449029df..f9e50abd 100644 --- a/src/guide/migration/slots-unification.md +++ b/src/guide/migration/slots-unification.md @@ -16,12 +16,12 @@ badges: 詳細については、以下をお読みください! -## 2.x 構文 +## 2.x での構文 render 関数を使用する場合、つまり、`h` は、2.x ではコンテンツノードの `slot` データプロパティを定義するために使用されます。 ```js -// 2.x 構文 +// 2.x での構文 h(LayoutComponent, [ h('div', { slot: 'header' }, this.header), h('div', { slot: 'content' }, this.content) @@ -31,16 +31,16 @@ h(LayoutComponent, [ さらに、スコープ付きスロットを参照する場合、次の構文を使用して参照できます: ```js -// 2.x 構文 +// 2.x での構文 this.$scopedSlots.header ``` -## 3.x 構文 +## 3.x での構文 3.x では、スロットはオブジェクトとしての現在のノードの子として定義されています: ```js -// 3.x 構文 +// 3.x での構文 h(LayoutComponent, {}, { header: () => h('div', this.header), content: () => h('div', this.content) @@ -50,10 +50,10 @@ h(LayoutComponent, {}, { また、スコープ付きスロットをプログラムで参照する必要がある場合、それらは `$slots` オプションに統合されるようになりました。 ```js -// 2.x 構文 +// 2.x での構文 this.$scopedSlots.header -// 3.x 構文 +// 3.x での構文 this.$slots.header() ``` From 78daed9be588201941269d2a0ae5dfa5134770e2 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Sun, 18 Apr 2021 01:42:55 +0900 Subject: [PATCH 2/2] fix: translate 'migration strategy' --- src/guide/migration/slots-unification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/migration/slots-unification.md b/src/guide/migration/slots-unification.md index f9e50abd..371607a4 100644 --- a/src/guide/migration/slots-unification.md +++ b/src/guide/migration/slots-unification.md @@ -57,7 +57,7 @@ this.$scopedSlots.header this.$slots.header() ``` -## 移行戦略 +## 移行の戦略 変更の大部分はすでに 2.6 で行われています。その結果、移行は1つのステップで実行できます: