Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-template
Project
Project
Details
Activity
Releases
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
张伯涛
web-template
Commits
336b0c46
Commit
336b0c46
authored
Sep 08, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由切换的白色动画添加判断
parent
57490be3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
26 deletions
+18
-26
AppMain.vue
src/layout/components/AppMain.vue
+18
-26
No files found.
src/layout/components/AppMain.vue
View file @
336b0c46
<
template
>
<
template
>
<section
class=
"app-main"
>
<section
class=
"app-main"
>
<div
class=
"container"
>
<div
class=
"container"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<!-- transition组件(过度动画)fade-transform(淡入变换)-->
<router-view
:key=
"key"
class=
"app-container-bg"
/>
<transition
:name=
"animation"
mode=
"out-in"
>
<!-- keep-alive组件,使被包含的组件保留状态,或避免重新渲染(匹配到的视图组件都会被缓存)-->
<keep-alive
include=
"Home"
>
<router-view
:key=
"key"
class=
"sf-jump-page"
/>
</keep-alive>
</transition>
</transition>
</div>
</div>
</section>
</section>
...
@@ -14,40 +18,28 @@ export default {
...
@@ -14,40 +18,28 @@ export default {
computed
:
{
computed
:
{
key
()
{
key
()
{
return
this
.
$route
.
path
return
this
.
$route
.
path
},
animation
()
{
return
this
.
$route
.
meta
.
needAnimation
?
'fade-transform'
:
undefined
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.app-main
{
.app-main
{
/*50 = navbar */
/*50 = navbar */
/*min-height: 100vh;*/
/*min-height: 100vh;*/
width
:
100%
;
width
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
/*background: #fffff;*/
background-color
:
#F4F4F4
;
background-color
:
#f4f4f4
;
.container
{
padding-bottom
:
0
;
/*background-color: #ffffff;*/
box-sizing
:
border-box
;
min-height
:
calc
(
92
.4vh
-
95px
);
.sf-jump-page
{
//margin: 0 14px 14px 14px;
min-height
:
calc
(
100vh
-
178px
);
border-radius
:
3px
;
background
:
#FFFFFF
;
}
.app-container-bg
{
background-color
:
#ffffff
;
}
}
.fixed-header
+
.app-main
{
//padding-top: 50px;
}
</
style
>
<
style
lang=
"scss"
>
// fix css style bug in open el-dialog
.el-popup-parent--hidden
{
.fixed-header
{
padding-right
:
15px
;
}
}
}
}
</
style
>
</
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