File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const routes = [
39
39
``` html
40
40
<router-view v-slot =" { Component, route }" >
41
41
<!-- Use any custom transition and to `fade` -->
42
- <transition :name =" route.meta.transitionName || 'fade'" >
42
+ <transition :name =" route.meta.transition || 'fade'" >
43
43
<component :is =" Component" />
44
44
</transition >
45
45
</router-view >
@@ -52,7 +52,7 @@ It is also possible to determine the transition to use dynamically based on the
52
52
``` html
53
53
<!-- use a dynamic transition name -->
54
54
<router-view v-slot =" { Component, route }" >
55
- <transition :name =" route.meta.transitionName " >
55
+ <transition :name =" route.meta.transition " >
56
56
<component :is =" Component" />
57
57
</transition >
58
58
</router-view >
@@ -64,7 +64,7 @@ We can add an [after navigation hook](./navigation-guards.md#global-after-hooks)
64
64
router .afterEach ((to , from ) => {
65
65
const toDepth = to .path .split (' /' ).length
66
66
const fromDepth = from .path .split (' /' ).length
67
- to .meta .transitionName = toDepth < fromDepth ? ' slide-right' : ' slide-left'
67
+ to .meta .transition = toDepth < fromDepth ? ' slide-right' : ' slide-left'
68
68
})
69
69
```
70
70
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const routes = [
39
39
``` html
40
40
<router-view v-slot =" { Component, route }" >
41
41
<!-- 使用任何自定义过渡和回退到 `fade` -->
42
- <transition :name =" route.meta.transitionName || 'fade'" >
42
+ <transition :name =" route.meta.transition || 'fade'" >
43
43
<component :is =" Component" />
44
44
</transition >
45
45
</router-view >
@@ -52,7 +52,7 @@ const routes = [
52
52
``` html
53
53
<!-- 使用动态过渡名称 -->
54
54
<router-view v-slot =" { Component, route }" >
55
- <transition :name =" route.meta.transitionName " >
55
+ <transition :name =" route.meta.transition " >
56
56
<component :is =" Component" />
57
57
</transition >
58
58
</router-view >
@@ -64,7 +64,7 @@ const routes = [
64
64
router .afterEach ((to , from ) => {
65
65
const toDepth = to .path .split (' /' ).length
66
66
const fromDepth = from .path .split (' /' ).length
67
- to .meta .transitionName = toDepth < fromDepth ? ' slide-right' : ' slide-left'
67
+ to .meta .transition = toDepth < fromDepth ? ' slide-right' : ' slide-left'
68
68
})
69
69
```
70
70
You can’t perform that action at this time.
0 commit comments