diff --git a/src/.vuepress/components/MigrationBadges.vue b/src/.vuepress/components/MigrationBadges.vue new file mode 100644 index 0000000000..d256d78cb6 --- /dev/null +++ b/src/.vuepress/components/MigrationBadges.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/.vuepress/theme/styles/index.styl b/src/.vuepress/theme/styles/index.styl index 757341eb43..f92d5035c5 100644 --- a/src/.vuepress/theme/styles/index.styl +++ b/src/.vuepress/theme/styles/index.styl @@ -128,6 +128,7 @@ h1, h2, h3, h4, h5, h6 &:first-child display flex + flex-wrap wrap align-items center margin-top -1.5rem margin-bottom 1rem diff --git a/src/guide/migration/async-components.md b/src/guide/migration/async-components.md index 372e63cfdf..ee0b1c9f2c 100644 --- a/src/guide/migration/async-components.md +++ b/src/guide/migration/async-components.md @@ -1,4 +1,9 @@ -# Async Components +--- +badges: + - new +--- + +# Async Components ## Overview diff --git a/src/guide/migration/attribute-coercion.md b/src/guide/migration/attribute-coercion.md index 8a7edf4da4..cd1d169534 100644 --- a/src/guide/migration/attribute-coercion.md +++ b/src/guide/migration/attribute-coercion.md @@ -1,4 +1,9 @@ -# Attribute Coercion Behavior +--- +badges: + - breaking +--- + +# Attribute Coercion Behavior ::: info Info This is a low-level internal API change and does not affect most developers. @@ -27,7 +32,7 @@ In 2.x, we had the following strategies for coercing `v-bind` values: The following table describes how Vue coerce "enumerated attributes" differently with normal non-boolean attributes: -| Binding expression | `foo` normal | `draggable` enumerated | +| Binding expression | `foo` normal | `draggable` enumerated | | ------------------- | ----------------------- | --------------------------------- | | `:attr="null"` | / | `draggable="false"` | | `:attr="undefined"` | / | / | @@ -53,7 +58,7 @@ For non-boolean attributes, Vue will stop removing them if they are `false` and The following table describes the new behavior: -| Binding expression | `foo` normal | `draggable` enumerated | +| Binding expression | `foo` normal | `draggable` enumerated | | ------------------- | -------------------------- | --------------------------------- | | `:attr="null"` | / | / | | `:attr="undefined"` | / | / | diff --git a/src/guide/migration/custom-directives.md b/src/guide/migration/custom-directives.md index 7e80d040e3..a0a5bb96d5 100644 --- a/src/guide/migration/custom-directives.md +++ b/src/guide/migration/custom-directives.md @@ -1,4 +1,9 @@ -# Custom Directives +--- +badges: + - breaking +--- + +# Custom Directives ## Overview diff --git a/src/guide/migration/custom-elements-interop.md b/src/guide/migration/custom-elements-interop.md index efdda91626..d492676b76 100644 --- a/src/guide/migration/custom-elements-interop.md +++ b/src/guide/migration/custom-elements-interop.md @@ -1,9 +1,9 @@ --- -types: +badges: - breaking --- -# Custom Elements Interop changes {{ type }} +# Custom Elements Interop changes # Overview diff --git a/src/guide/migration/data-option.md b/src/guide/migration/data-option.md index 2a4dc6be52..513f3edbbd 100644 --- a/src/guide/migration/data-option.md +++ b/src/guide/migration/data-option.md @@ -1,9 +1,10 @@ --- -types: +title: Data Option +badges: - breaking --- -# Data Option {{ type }} +# {{ $frontmatter.title }} ## Overview diff --git a/src/guide/migration/events-api.md b/src/guide/migration/events-api.md index 5c347c9e5b..c0b5709b47 100644 --- a/src/guide/migration/events-api.md +++ b/src/guide/migration/events-api.md @@ -1,10 +1,9 @@ --- -types: - - removed +badges: - breaking --- -# Events API {{ type }} +# Events API ## Overview diff --git a/src/guide/migration/filters.md b/src/guide/migration/filters.md index 101e8c15c6..7f8a29ba7b 100644 --- a/src/guide/migration/filters.md +++ b/src/guide/migration/filters.md @@ -1,10 +1,9 @@ --- -types: +badges: - removed - - breaking --- -# Filters {{ type }} +# Filters ## Overview diff --git a/src/guide/migration/fragments.md b/src/guide/migration/fragments.md index bd68409a7b..074179a9ad 100644 --- a/src/guide/migration/fragments.md +++ b/src/guide/migration/fragments.md @@ -1,4 +1,9 @@ -# Fragments +--- +badges: + - new +--- + +# Fragments ## Overview diff --git a/src/guide/migration/functional-components.md b/src/guide/migration/functional-components.md index 14d0af8079..056b899688 100644 --- a/src/guide/migration/functional-components.md +++ b/src/guide/migration/functional-components.md @@ -1,4 +1,9 @@ -# Functional Components +--- +badges: + - breaking +--- + +# Functional Components ## Overview @@ -6,8 +11,8 @@ In terms of what has changed, at a high level: - Performance gains from 2.x for functional components are now negligible in 3.x, 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) `