From 14851f5c857d3b3a71bd2c1f7031e7bb1ee626c1 Mon Sep 17 00:00:00 2001 From: NataliaTepluhina Date: Wed, 4 Nov 2020 19:11:46 +0100 Subject: [PATCH 1/5] fix: fixed custom directives migration guide --- src/guide/migration/custom-directives.md | 27 +++--------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 0dbec65558..7e16c55131 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -10,7 +10,6 @@ badges: Here is a quick summary of what has changed: - API has been renamed to better align with component lifecycle -- Custom directives will be controlled by child component via `v-bind="$attrs"` For more information, read on! @@ -103,26 +102,6 @@ mounted(el, binding, vnode) { } ``` -## Implementation Details - -In Vue 3, we're now supporting fragments, which allow us to return more than one DOM node per component. You can imagine how handy that is for something like a component with multiple `
  • ` elements or the children elements of a table: - -```html - -``` - -As wonderfully flexible as this is, we can potentially encounter a problem with a custom directive that could have multiple root nodes. - -As a result, custom directives are now included as part of a virtual DOM node’s data. When a custom directive is used on a component, hooks are passed down to the component as extraneous props and end up in `this.$attrs`. - -This also means it's possible to directly hook into an element's lifecycle like this in the template, which can be handy when a custom directive is too involved: - -```html -
    -``` - -This is consistent with the attribute fallthrough behavior, so when a child component uses `v-bind="$attrs"` on an inner element, it will apply any custom directives used on it as well. +:::warning +With [fragments](/guide/migration/fragments.html#overview) support, components can potentially have more than one root nodes. When applied to a multi-root component, directive will be ignored and the warning will be thrown. +::: From 90808822eb32371d8187497f321d29bf64322f92 Mon Sep 17 00:00:00 2001 From: YuLe Date: Thu, 5 Nov 2020 02:26:09 +0800 Subject: [PATCH 2/5] Update the GitHub repo link to `vue-next` (#672) --- src/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/README.md b/src/README.md index a497bd228f..d537873e8d 100644 --- a/src/README.md +++ b/src/README.md @@ -11,7 +11,7 @@ actionButtons: - text: Get Started link: /guide/introduction - text: GitHub - link: https://github.com/vuejs/vue + link: https://github.com/vuejs/vue-next extraClass: github grey icon: fa fa-github target: _blank @@ -30,7 +30,7 @@ footer: | Copyright © 2014-2020 Evan You socialIcons: - type: GitHub - link: https://github.com/vuejs/vue + link: https://github.com/vuejs/vue-next - type: Twitter link: https://twitter.com/vuejs - type: Medium From 265b8b5caf5c4b0a7c067172827d384489dcac24 Mon Sep 17 00:00:00 2001 From: Alexander Sokolov Date: Thu, 5 Nov 2020 18:24:22 +0300 Subject: [PATCH 3/5] Update introduction.md (#673) --- src/guide/migration/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/migration/introduction.md b/src/guide/migration/introduction.md index b45407248d..01e0b65369 100644 --- a/src/guide/migration/introduction.md +++ b/src/guide/migration/introduction.md @@ -112,7 +112,7 @@ The following consists a list of breaking changes from 2.x: - [$on, $off and $once instance methods](/guide/migration/events-api.html) - [Filters](/guide/migration/filters.html) - [Inline templates attributes](/guide/migration/inline-template-attribute.html) -- [`$children` intance property](/guide/migration/children.md) +- [`$children` instance property](/guide/migration/children.md) - `$destroy` instance method. Users should no longer manually manage the lifecycle of individual Vue components. ## Supporting Libraries From 6453ae576de792eb97a6a3045cbab450ff644e8a Mon Sep 17 00:00:00 2001 From: Aris Merchant Date: Thu, 5 Nov 2020 07:24:57 -0800 Subject: [PATCH 4/5] Improve formatting of teleport.md (#674) This switches a link to using VideoLesson, which should make it look a lot better. It also fixes a small punctuation typo. --- src/guide/teleport.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guide/teleport.md b/src/guide/teleport.md index ad94504c50..5e65865271 100644 --- a/src/guide/teleport.md +++ b/src/guide/teleport.md @@ -1,6 +1,6 @@ # Teleport - +Learn how to use teleport with a free lesson on Vue School Vue encourages us to build our UIs by encapsulating UI and related behavior into components. We can nest them inside one another to build a tree that makes up an application UI. @@ -140,4 +140,4 @@ A common use case scenario would be a reusable `` component of which ther
    ``` -You can check `` component options in the [API reference](../api/built-in-components.html#teleport) +You can check `` component options in the [API reference](../api/built-in-components.html#teleport). From 881e1337c45edcbd5ee0cbe942bb6f09195f2a37 Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:25:21 +0800 Subject: [PATCH 5/5] Fix a typo (#675) --- src/guide/contributing/translations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/contributing/translations.md b/src/guide/contributing/translations.md index 844ea17014..23e4999a16 100644 --- a/src/guide/contributing/translations.md +++ b/src/guide/contributing/translations.md @@ -1,6 +1,6 @@ # Translations -Vue has spread across the globe, with the core team being in at least half a dozen different timezones. [The forum](https://forum.vuejs.org/) includes 7 languages and counting and many of our docs have [actively-maintained translations](https://github.com/vuejs?utf8=%E2%9C%93&q=vuejs.org). We'are very proud of Vue's international reach, but we can do even better. +Vue has spread across the globe, with the core team being in at least half a dozen different timezones. [The forum](https://forum.vuejs.org/) includes 7 languages and counting and many of our docs have [actively-maintained translations](https://github.com/vuejs?utf8=%E2%9C%93&q=vuejs.org). We're very proud of Vue's international reach, but we can do even better. ## Can we start translating Vue 3 docs?