From 1b76a15edbf6ee36777a66b419309cd38a606d86 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 14 Jul 2020 23:00:53 -0400 Subject: [PATCH 1/3] feature (#169): add new migration badges --- src/.vuepress/components/MigrationBadges.vue | 71 ++++++++++++++++++++ src/.vuepress/styles/index.styl | 10 --- src/.vuepress/theme/styles/index.styl | 1 + 3 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 src/.vuepress/components/MigrationBadges.vue diff --git a/src/.vuepress/components/MigrationBadges.vue b/src/.vuepress/components/MigrationBadges.vue new file mode 100644 index 0000000000..14d8b5a050 --- /dev/null +++ b/src/.vuepress/components/MigrationBadges.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/src/.vuepress/styles/index.styl b/src/.vuepress/styles/index.styl index 1ed44dd2bd..fd40ef0fd5 100644 --- a/src/.vuepress/styles/index.styl +++ b/src/.vuepress/styles/index.styl @@ -156,13 +156,3 @@ font-weight: bold; opacity: 1!important; } - -.badge { - background-color: #b00000; - font-size: 0.8rem; - border: 2px solid #b00000; - border-radius: 5px; - margin-right: 0.5rem; - color: #fff; - padding: 0.25rem 0.25rem; -} diff --git a/src/.vuepress/theme/styles/index.styl b/src/.vuepress/theme/styles/index.styl index b63f1b4093..bfa54ba890 100644 --- a/src/.vuepress/theme/styles/index.styl +++ b/src/.vuepress/theme/styles/index.styl @@ -120,6 +120,7 @@ h1, h2, h3, h4, h5, h6 &:first-child display flex + flex-wrap wrap align-items center margin-top -1.5rem margin-bottom 1rem From 040280a50fed4a5e0ec9593210a07e1261ed12ae Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 14 Jul 2020 23:01:12 -0400 Subject: [PATCH 2/3] docs (#169): update badges on parts of migration guide --- src/guide/migration/data-option.md | 5 +- src/guide/migration/events-api.md | 4 +- src/guide/migration/filters.md | 4 +- src/guide/migration/functional-components.md | 11 ++- src/guide/migration/global-api.md | 78 ++++++++++++-------- src/guide/migration/keycode-modifiers.md | 7 ++ src/guide/migration/treeshaking.md | 39 ++++++---- src/guide/migration/v-model.md | 9 +++ 8 files changed, 104 insertions(+), 53 deletions(-) diff --git a/src/guide/migration/data-option.md b/src/guide/migration/data-option.md index 2a4dc6be52..383e522398 100644 --- a/src/guide/migration/data-option.md +++ b/src/guide/migration/data-option.md @@ -1,9 +1,12 @@ --- +title: Data Option types: - breaking --- -# Data Option {{ type }} +# {{ $frontmatter.title }} + + ## Overview diff --git a/src/guide/migration/events-api.md b/src/guide/migration/events-api.md index bc3c89e3da..f4e5f235c3 100644 --- a/src/guide/migration/events-api.md +++ b/src/guide/migration/events-api.md @@ -4,7 +4,9 @@ types: - breaking --- -# `$on`, `$off` and `$once` methods removal {{ type }} +# `$on`, `$off` and `$once` methods + + ## Overview diff --git a/src/guide/migration/filters.md b/src/guide/migration/filters.md index 49bb45777c..2e7e940365 100644 --- a/src/guide/migration/filters.md +++ b/src/guide/migration/filters.md @@ -4,7 +4,9 @@ types: - breaking --- -# Filters {{ type }} +# Filters + + ## Overview diff --git a/src/guide/migration/functional-components.md b/src/guide/migration/functional-components.md index 0da35ca96f..b2020eefd1 100644 --- a/src/guide/migration/functional-components.md +++ b/src/guide/migration/functional-components.md @@ -1,13 +1,20 @@ +--- +types: + - breaking +--- + # Functional Components + + ## Overview In terms of what has changed, at a high level: - Performance gains from v2 for functional components are now negligible in v3, so we recommend just using stateful components - Functional components can only be created using a plain function that receives `props` and `context` (i.e., `slots`, `attrs`, `emit`) -- **DEPRECATED:** `functional` attribute on single-file component (SFC) `