Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-pc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-pc
Commits
86ef24e8
Commit
86ef24e8
authored
Oct 25, 2023
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加路由切换过度效果
parent
967b0d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
index.vue
src/layouts/page/index.vue
+21
-6
No files found.
src/layouts/page/index.vue
View file @
86ef24e8
<
template
>
<RouterView>
<template
#
default=
"
{ Component, route }">
<
Transition
name=
"Child
"
mode=
"out-in"
appear
>
<div
:key=
"route.
fullP
ath"
>
<
transition
name=
"fade-slide
"
mode=
"out-in"
appear
>
<div
:key=
"route.
p
ath"
>
<keep-alive
v-if=
"route.meta?.keepAlive"
>
<component
:is=
"Component"
:key=
"route.
fullP
ath"
></component>
<component
:is=
"Component"
:key=
"route.
p
ath"
></component>
</keep-alive>
<component
v-else
:is=
"Component"
:key=
"route.
fullP
ath"
></component>
<component
v-else
:is=
"Component"
:key=
"route.
p
ath"
></component>
</div>
</
T
ransition>
</
t
ransition>
</
template
>
</RouterView>
</template>
<
script
lang=
"ts"
setup
></
script
>
<
style
></
style
>
<
style
scoped
>
.fade-slide-leave-active
,
.fade-slide-enter-active
{
transition
:
all
0.3s
;
}
.fade-slide-enter-from
{
transform
:
translateX
(
-30px
);
opacity
:
0
;
}
.fade-slide-leave-to
{
transform
:
translateX
(
30px
);
opacity
:
0
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment