From a3c0c2765fb2e2c98a980c9bde773fe87a9a1bf8 Mon Sep 17 00:00:00 2001 From: GU Yiling Date: Wed, 25 Aug 2021 21:51:55 +0800 Subject: [PATCH 1/4] docs: fix the description for enumerated attributes coercion change (#1208) --- 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" From 8c8e59a4d1396f50fa8773ca2f27fe6ace3f13a0 Mon Sep 17 00:00:00 2001 From: Kai <9503447+krienow@users.noreply.github.com> Date: Wed, 25 Aug 2021 21:52:50 +0200 Subject: [PATCH 2/4] fix: missing comma in web-components.md (#1192) --- src/guide/web-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/web-components.md b/src/guide/web-components.md index e75cfd91ce..4f9793ca2f 100644 --- a/src/guide/web-components.md +++ b/src/guide/web-components.md @@ -44,7 +44,7 @@ module.exports = { .rule('vue') .use('vue-loader') .tap(options => ({ - ...options + ...options, compilerOptions: { // treat any tag that starts with ion- as custom elements isCustomElement: tag => tag.startsWith('ion-') From 4d745447a0aefd3f616ae50277b6d87067243c34 Mon Sep 17 00:00:00 2001 From: Christian M <7541795+chriamue@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:08:39 +0200 Subject: [PATCH 3/4] Update web-components.md (#1207) Fixed tipo in MyBar.ce.bar as MyBar.ce.vue. --- src/guide/web-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/web-components.md b/src/guide/web-components.md index 4f9793ca2f..20436165be 100644 --- a/src/guide/web-components.md +++ b/src/guide/web-components.md @@ -200,7 +200,7 @@ It is recommended to export the individual element constructors to give your use ```js import { defineCustomElement } from 'vue' import Foo from './MyFoo.ce.vue' -import Bar from './MyBar.ce.bar' +import Bar from './MyBar.ce.vue' const MyFoo = defineCustomElement(Foo) const MyBar = defineCustomElement(Bar) From 10849bb05dc75e7c59917ca3fdf660790b8fdc9a Mon Sep 17 00:00:00 2001 From: Dan Jutan Date: Sat, 28 Aug 2021 18:46:57 -0400 Subject: [PATCH 4/4] Script Setup Edits for Clarity (#1194) * Second-person consistency * Edit defineProps and defineEmits for clarity * Update src/api/sfc-script-setup.md Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com> Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com> --- src/api/sfc-script-setup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index a775ebf4c9..cfb7b2b3c6 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -89,7 +89,7 @@ Think of `MyComponent` as being referenced as a variable. If you have used JSX, ### Dynamic Components -Since components are referenced as variables instead of registered under string keys, we should use dynamic `:is` binding when using dynamic components inside `