From 4be0f3c2adc40c574721c092dd6df6b32fe5cb71 Mon Sep 17 00:00:00 2001 From: wxsm Date: Fri, 17 Sep 2021 15:13:01 +0800 Subject: [PATCH 1/2] update slots-unification.md --- src/guide/migration/slots-unification.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/guide/migration/slots-unification.md b/src/guide/migration/slots-unification.md index 94aa87636..1aa2416b1 100644 --- a/src/guide/migration/slots-unification.md +++ b/src/guide/migration/slots-unification.md @@ -18,7 +18,7 @@ badges: ## 2.x 语法 -当使用渲染函数时,即 `h`,2.x 用于在内容节点上定义 `slot` 数据 property。 +当使用渲染函数 (即 `h`) 时,2.x 曾经在内容节点上定义 `slot` 数据 property。 ```js // 2.x 语法 @@ -28,7 +28,7 @@ h(LayoutComponent, [ ]) ``` -此外,在引用作用域插槽时,可以使用以下方法引用它们: +此外,可以使用以下语法引用作用域插槽: ```js // 2.x 语法 @@ -37,7 +37,7 @@ this.$scopedSlots.header ## 3.x 语法 -在 3.x 中,将插槽定义为当前节点的子对象: +在 3.x 中,插槽以对象的形式定义为当前节点的子节点: ```js // 3.x Syntax @@ -47,7 +47,7 @@ h(LayoutComponent, {}, { }) ``` -当你需要以编程方式引用作用域插槽时,它们现在被统一到 `$slots` 选项中。 +当你需要以编程方式引用作用域插槽时,它们现在被统一到 `$slots` 选项中了。 ```js // 2.x 语法 From e27c6d59c4338021968110a117c864051b563a67 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Sun, 19 Sep 2021 11:27:00 +0800 Subject: [PATCH 2/2] Apply suggestions from code review --- 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 1aa2416b1..27daa7b4d 100644 --- a/src/guide/migration/slots-unification.md +++ b/src/guide/migration/slots-unification.md @@ -18,7 +18,7 @@ badges: ## 2.x 语法 -当使用渲染函数 (即 `h`) 时,2.x 曾经在内容节点上定义 `slot` 数据 property。 +当使用渲染函数,即 `h` 时,2.x 曾经在内容节点上定义 `slot` 数据 property。 ```js // 2.x 语法