From 19ef22bd82e7994d5a0a3a689ae6e7c75170dbc3 Mon Sep 17 00:00:00 2001 From: "22969541+Aurelius333@users.noreply.github.com" <22969541+Aurelius333@users.noreply.github.com> Date: Tue, 15 Sep 2020 23:57:19 -0400 Subject: [PATCH 1/2] feat: add migration guide section about "key" attribute changes Fix #379 --- src/.vuepress/config.js | 86 +++++++++++++++----------- src/guide/migration/introduction.md | 1 + src/guide/migration/key-attribute.md | 91 ++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+), 34 deletions(-) create mode 100644 src/guide/migration/key-attribute.md diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index aff8c46424..72f98ba57c 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -1,10 +1,13 @@ const sidebar = { - cookbook: [{ - title: 'Cookbook', - collapsable: false, - children: ['/cookbook/', '/cookbook/editable-svg-icons'] - }], - guide: [{ + cookbook: [ + { + title: 'Cookbook', + collapsable: false, + children: ['/cookbook/', '/cookbook/editable-svg-icons'] + } + ], + guide: [ + { title: 'Essentials', collapsable: false, children: [ @@ -60,7 +63,8 @@ const sidebar = { { title: 'Advanced Guides', collapsable: false, - children: [{ + children: [ + { title: 'Reactivity', children: [ '/guide/reactivity', @@ -123,6 +127,7 @@ const sidebar = { 'migration/global-api', 'migration/global-api-treeshaking', 'migration/inline-template-attribute', + 'migration/key-attribute', 'migration/keycode-modifiers', 'migration/render-function-api', 'migration/slots-unification', @@ -172,21 +177,23 @@ const sidebar = { }, '/api/composition-api' ], - examples: [{ - title: 'Examples', - collapsable: false, - children: [ - '/examples/markdown', - '/examples/commits', - '/examples/grid-component', - '/examples/tree-view', - '/examples/svg', - '/examples/modal', - '/examples/elastic-header', - '/examples/select2', - '/examples/todomvc' - ] - }] + examples: [ + { + title: 'Examples', + collapsable: false, + children: [ + '/examples/markdown', + '/examples/commits', + '/examples/grid-component', + '/examples/tree-view', + '/examples/svg', + '/examples/modal', + '/examples/elastic-header', + '/examples/select2', + '/examples/todomvc' + ] + } + ] } module.exports = { @@ -196,21 +203,26 @@ module.exports = { [ 'link', { - href: 'https://fonts.googleapis.com/css?family=Inter:300,400,500,600|Open+Sans:400,600;display=swap', + href: + 'https://fonts.googleapis.com/css?family=Inter:300,400,500,600|Open+Sans:400,600;display=swap', rel: 'stylesheet' } ], [ 'link', { - href: 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', + href: + 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', rel: 'stylesheet' } ], - ['link', { - rel: 'icon', - href: '/logo.png' - }], + [ + 'link', + { + rel: 'icon', + href: '/logo.png' + } + ], [ 'script', { @@ -227,10 +239,12 @@ module.exports = { ], themeConfig: { logo: '/logo.png', - nav: [{ + nav: [ + { text: 'Docs', ariaLabel: 'Documentation Menu', - items: [{ + items: [ + { text: 'Guide', link: '/guide/introduction' }, @@ -254,10 +268,12 @@ module.exports = { }, { text: 'Ecosystem', - items: [{ + items: [ + { text: 'Community', ariaLabel: 'Community Menu', - items: [{ + items: [ + { text: 'Team', link: '/community/team/' }, @@ -277,7 +293,8 @@ module.exports = { }, { text: 'Official Projects', - items: [{ + items: [ + { text: 'Vue Router', link: 'https://router.vuejs.org/' }, @@ -308,7 +325,8 @@ module.exports = { { text: 'Support Vue', link: '/support-vuejs/', - items: [{ + items: [ + { text: 'One-time Donations', link: '/support-vuejs/#one-time-donations' }, diff --git a/src/guide/migration/introduction.md b/src/guide/migration/introduction.md index f2b50b9e43..022434b218 100644 --- a/src/guide/migration/introduction.md +++ b/src/guide/migration/introduction.md @@ -42,6 +42,7 @@ The following consists a list of breaking changes from 2.x: - [Custom directive API changed to align with component lifecycle](/guide/migration/custom-directives.html) - [Some transition classes got a rename](/guide/migration/transition.md) - [Component watch option](/api/options-data.html#watch) and [instance method `$watch`](/api/instance-methods.html#watch) no longer supports dot-delimited string paths, use a computed function as the parameter instead +- [Changes in `key` attribute usage with `v-if` and `