From 14979da4f11a626b66c9dcb416f57613467db05d Mon Sep 17 00:00:00 2001 From: Justineo Date: Wed, 25 Aug 2021 14:02:07 +0800 Subject: [PATCH] docs: fix the description for enumerated attributes coercion change --- src/guide/migration/attribute-coercion.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guide/migration/attribute-coercion.md b/src/guide/migration/attribute-coercion.md index 076d4df122..00696cb055 100644 --- a/src/guide/migration/attribute-coercion.md +++ b/src/guide/migration/attribute-coercion.md @@ -85,7 +85,7 @@ The absence of an enumerated attribute and `attr="false"` may produce different | `draggable` | `draggable` → `false` | | `spellcheck` | `spellcheck` → `true` | -To keep the old behavior work, and as we will be coercing `false` to `'false'`, in 3.x Vue developers need to make `v-bind` expression resolve to `false` or `'false'` for `contenteditable` and `spellcheck`. +Since we no longer coerce `null` to `'false'` for “enumerated properties” in 3.x, in the case of `contenteditable` and `spellcheck`, developers will need to change those `v-bind` expressions that used to resolve to `null` to resolve to `false` or `'false'` in order to maintain the same behavior as 2.x. In 2.x, invalid values were coerced to `'true'` for enumerated attributes. This was usually unintended and unlikely to be relied upon on a large scale. In 3.x `true` or `'true'` should be explicitly specified. @@ -107,7 +107,7 @@ In 3.x, `null` or `undefined` should be used to explicitly remove an attribute. 2.x “Enumerated attrs”
i.e. contenteditable, draggable and spellcheck. - undefined, false + undefined undefined, null removed @@ -120,7 +120,7 @@ In 3.x, `null` or `undefined` should be used to explicitly remove an attribute. "true" - null, 'false' + null, false, 'false' false, 'false' "false"