From 347a8e4293ef8646ce0c6b083d8d4e4e4e677629 Mon Sep 17 00:00:00 2001 From: FAKER-A <1037881273@qq.com> Date: Mon, 19 Oct 2020 15:33:01 +0800 Subject: [PATCH 1/6] style: Unified style --- src/guide/migration/custom-directives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index c4952b4cc..16845e584 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -49,7 +49,7 @@ Vue.directive('highlight', { - **beforeUpdate**:新的!这是在元素本身更新之前调用的,很像组件生命周期钩子 - update → 移除!有太多的相似之处要更新,所以这是多余的,请改用 `updated` - componentUpdated → **updated** -- **beforeUnmount** 新的!与组件生命周期钩子类似,它将在卸载元素之前调用。 +- **beforeUnmount**:新的!与组件生命周期钩子类似,它将在卸载元素之前调用。 - unbind -> **unmounted** 最终 API 如下: From 1ddbe948de6104ec434682e8a00637a91f0478ae Mon Sep 17 00:00:00 2001 From: FAKER-A <1037881273@qq.com> Date: Mon, 19 Oct 2020 15:45:40 +0800 Subject: [PATCH 2/6] style: Synchronize English documents --- src/guide/migration/custom-directives.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 16845e584..d4f1650ad 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -107,7 +107,7 @@ mounted(el, binding, vnode) { ## 实施细节 -在 Vue 3 中,我们现在支持片段,这允许我们为每个组件返回多个 DOM 节点。你可以想象,对于具有多个 lis 的组件或一个表的子元素这样的组件有多方便: +在 Vue 3 中,我们现在支持片段,这允许我们为每个组件返回多个 DOM 节点。你可以想象,对于具有多个 `
  • ` 的组件或一个表的子元素这样的组件有多方便: ```html ``` -## 3.x Synta 语法 x +## 3.x 语法 在 3.x 中,组件现在可以有多个根节点!但是,这确实要求开发者明确定义属性应该分布在哪里。 From 579d74db206252c87d6d282943729a3928339c6e Mon Sep 17 00:00:00 2001 From: FAKER-A <1037881273@qq.com> Date: Tue, 20 Oct 2020 11:31:24 +0800 Subject: [PATCH 5/6] fix: Modified according to the amendment --- src/guide/migration/custom-directives.md | 6 +++--- src/guide/migration/custom-elements-interop.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index d4f1650ad..1eedbbdcd 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -46,10 +46,10 @@ Vue.directive('highlight', { - bind → **beforeMount** - inserted → **mounted** -- **beforeUpdate**:新的!这是在元素本身更新之前调用的,很像组件生命周期钩子 -- update → 移除!有太多的相似之处要更新,所以这是多余的,请改用 `updated` +- **beforeUpdate**:新的!这是在元素本身更新之前调用的,很像组件生命周期钩子。 +- update → 移除!有太多的相似之处要更新,所以这是多余的,请改用 `updated` - componentUpdated → **updated** -- **beforeUnmount**:新的!与组件生命周期钩子类似,它将在卸载元素之前调用。 +- **beforeUnmount**:新的!与组件生命周期钩子类似,它将在卸载元素之前调用。 - unbind -> **unmounted** 最终 API 如下: diff --git a/src/guide/migration/custom-elements-interop.md b/src/guide/migration/custom-elements-interop.md index 8af2c9030..195b7730d 100644 --- a/src/guide/migration/custom-elements-interop.md +++ b/src/guide/migration/custom-elements-interop.md @@ -7,9 +7,9 @@ badges: ## 概览 -- **BREAKING:** 自定义元素白名单现在在模板编译期间执行,应该通过编译器选项而不是运行时配置来配置。 -- **BREAKING:** 特定 `is` prop 用法仅限于保留的 `` 标记 -- **NEW:** 有了新的 `v-is` 指令来支持 2.x 用例,其中在原生元素上使用了 `v-is` 来处理原生 HTML 解析限制。 +- **非兼容**:自定义元素白名单现在在模板编译期间执行,应该通过编译器选项而不是运行时配置来配置。 +- **非兼容**:特定 `is` prop 用法仅限于保留的 `` 标记。 +- **新**:有了新的 `v-is` 指令来支持 2.x 用例,其中在原生元素上使用了 `v-is` 来处理原生 HTML 解析限制。 ## 自主定制元素 From 0a3a2d620f0b27bbd3c29e47858a3426166020d1 Mon Sep 17 00:00:00 2001 From: Godpu <908662421@qq.com> Date: Tue, 20 Oct 2020 13:48:03 +0800 Subject: [PATCH 6/6] update: src/guide/migration/custom-directives.md --- src/guide/migration/custom-directives.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 1eedbbdcd..29d498e4a 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -47,7 +47,7 @@ Vue.directive('highlight', { - bind → **beforeMount** - inserted → **mounted** - **beforeUpdate**:新的!这是在元素本身更新之前调用的,很像组件生命周期钩子。 -- update → 移除!有太多的相似之处要更新,所以这是多余的,请改用 `updated` +- update → 移除!有太多的相似之处要更新,所以这是多余的,请改用 `updated`。 - componentUpdated → **updated** - **beforeUnmount**:新的!与组件生命周期钩子类似,它将在卸载元素之前调用。 - unbind -> **unmounted** @@ -127,4 +127,4 @@ mounted(el, binding, vnode) {
    ``` -这与属性 fallthrough 行为是一致的,因此,当子组件在内部元素上使用 `v-bind="$attrs"` 时,它也将应用对其使用的任何自定义指令。 \ No newline at end of file +这与属性 fallthrough 行为是一致的,因此,当子组件在内部元素上使用 `v-bind="$attrs"` 时,它也将应用对其使用的任何自定义指令。