You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/components.md
+2-56Lines changed: 2 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Components
3
3
type: guide
4
-
order: 13
4
+
order: 11
5
5
---
6
6
7
7
## What are Components?
@@ -89,7 +89,7 @@ new Vue({
89
89
})
90
90
```
91
91
92
-
The same encapsulation applies for other registerable Vue features, such as directives and transitions.
92
+
The same encapsulation applies for other registerable Vue features, such as directives.
93
93
94
94
### Component Option Caveats
95
95
@@ -938,60 +938,6 @@ If you want to keep the switched-out components in memory so that you can preser
938
938
</component>
939
939
```
940
940
941
-
### Transitioning Components
942
-
943
-
Just as we did [with elements](transitions.html#Transitioning-Between-Elements), we can transition between components, but we don't need the `key` attribute:
Copy file name to clipboardExpand all lines: src/guide/transitions.md
+74-6Lines changed: 74 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Transitions: Entering, Leaving, and Lists'
3
3
type: guide
4
-
order: 11
4
+
order: 12
5
5
---
6
6
7
7
## Overview
@@ -21,7 +21,7 @@ Vue provides a `transition` wrapper component, allowing you to add entering/leav
21
21
22
22
- Conditional rendering (using `v-if`)
23
23
- Conditional display (using `v-show`)
24
-
- Dynamic components (introduced in the [next section](components.html#Dynamic-Components))
24
+
- Dynamic components
25
25
- Component root nodes
26
26
27
27
This is what a very simple example looks like in action:
@@ -592,7 +592,7 @@ and custom JavaScript hooks:
592
592
593
593
## Transitioning Between Elements
594
594
595
-
We discuss [transitioning between components](components.html#Dynamic-Components) later, but you can also transition between raw elements using `v-if`/`v-else`. One of the most common two-element transitions is between a list container and a message describing an empty list:
595
+
We discuss [transitioning between components](#Transitioning-Between-Components) later, but you can also transition between raw elements using `v-if`/`v-else`. One of the most common two-element transitions is between a list container and a message describing an empty list:
596
596
597
597
```html
598
598
<transition>
@@ -883,6 +883,76 @@ new Vue({
883
883
884
884
Pretty cool, right?
885
885
886
+
## Transitioning Between Components
887
+
888
+
Transitioning between components is even simpler - we don't even need the `key` attribute. Instead, we just wrap a [dynamic component](components.html#Dynamic-Components):
Transitions can be reused through Vue's component system. If you aren't yet familiar with it, you should read [the components guide](components.html) now before continuing with the rest of this document.
1392
-
1393
-
OK, I'll assume you're familiar with components now. To create a reusable transition, all you have to do is place a `<transition>` or `<transition-group>` component at the root, then pass any children into the transition component.
1461
+
Transitions can be reused through Vue's component system. To create a reusable transition, all you have to do is place a `<transition>` or `<transition-group>` component at the root, then pass any children into the transition component.
0 commit comments