From f29ae8dfc29c309ddb76c2f5d1218fb55977658e Mon Sep 17 00:00:00 2001 From: wxsm Date: Wed, 25 Aug 2021 11:21:08 +0800 Subject: [PATCH 1/8] update attribute-coercion.md --- src/guide/migration/attribute-coercion.md | 53 +++++++++++------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/guide/migration/attribute-coercion.md b/src/guide/migration/attribute-coercion.md index ae24c52cd..f24ee83ac 100644 --- a/src/guide/migration/attribute-coercion.md +++ b/src/guide/migration/attribute-coercion.md @@ -6,15 +6,15 @@ badges: # attribute 强制行为 :::info 信息 -这是一个低等级的内部 API 更改,不会影响大多数开发人员。 +这是一个底层的内部 API 更改,绝大多数开发人员不会受到影响。 ::: ## 概览 -下面是对这些变化的高层次总结: +以下是对变化的总体概述: -- 删除枚举 attribute 的内部概念,并将这些 attribute 视为普通的非布尔 attribute -- **重大改变**:如果值为布尔值,则不再删除 attribute `false`。相反,它被设置为 attr=“false”。移除 attribute,应该使用 `null` 或者 `undefined`。 +- 移除枚举 attribute 的内部概念,并将这些 attribute 视为普通的非布尔 attribute +- **非兼容**:如果值为布尔值 `false`,则不再移除 attribute。取而代之的是,它将被设置为 attr="false"。若要移除 attribute,应该使用 `null` 或者 `undefined`。 如需更深入的解释,请继续阅读! @@ -22,13 +22,13 @@ badges: 在 2.x,我们有以下策略来强制 `v-bind` 的值: -- 对于某些 attribute/元素对,Vue 始终使用相应的 IDL attribute(property):[比如拥有 `value` 的 ``,``,``,``,`