mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-20 04:51:51 +00:00
Add page transition
This commit is contained in:
parent
ad950f331d
commit
3410e4fb18
2 changed files with 32 additions and 1 deletions
|
|
@ -141,7 +141,9 @@
|
|||
</div>
|
||||
</md-sidenav>
|
||||
|
||||
<router-view></router-view>
|
||||
<transition name="md-router">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -280,6 +282,31 @@
|
|||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.md-router-enter-active,
|
||||
.md-router-leave-active {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 280px;
|
||||
transition: $swift-ease-out;
|
||||
}
|
||||
|
||||
.md-router-enter,
|
||||
.md-router-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.md-router-enter {
|
||||
.single-page-banner .md-toolbar {
|
||||
min-height: 64px;
|
||||
padding-top: 0;
|
||||
|
||||
.md-title {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../core/stylesheets/variables.scss';
|
||||
|
||||
.single-page-banner {
|
||||
min-height: 256px;
|
||||
padding-top: 98px;
|
||||
|
|
@ -23,6 +25,7 @@
|
|||
right: 0;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
transition: $swift-ease-out;
|
||||
color: #fff !important;
|
||||
|
||||
.md-title:first-child {
|
||||
|
|
@ -30,6 +33,7 @@
|
|||
font-size: 45px;
|
||||
font-weight: 400;
|
||||
line-height: 1.3em;
|
||||
transition: $swift-ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue