feat: add global page toggling animation

master
chenghx 6 years ago
parent a514bb4197
commit bf932950d6
  1. 13
      src/App.vue
  2. 2
      src/components/layout/MenuView.vue
  3. 4
      src/components/layout/PageView.vue
  4. 2
      src/components/layout/RouteView.vue

@ -19,8 +19,8 @@ export default {
</script>
<style lang="less">
//
:global{
//
.dragable-ghost{
border: 1px dashed #aaaaaa;
opacity: 0.65;
@ -33,5 +33,16 @@ export default {
border: 1px dashed #aaaaaa;
opacity: 0.65;
}
//
.page-toggle-enter-active{
transition: all 0.2s ease-in 0.25s;
}
.page-toggle-leave-active{
transition: all 0.2s ease-out 0s;
}
.page-toggle-enter, .page-toggle-leave-to{
opacity: 0;
padding: 0px;
}
}
</style>

@ -1,6 +1,8 @@
<template>
<global-layout>
<transition name="page-toggle">
<router-view />
</transition>
</global-layout>
</template>

@ -3,7 +3,9 @@
<div slot="extra" class="extraImg">
<img :src="extraImage"/>
</div>
<router-view ref="page"/>
<transition name="page-toggle">
<router-view ref="page"/>
</transition>
</page-layout>
</template>

@ -1,5 +1,7 @@
<template>
<transition name="page-toggle">
<router-view />
</transition>
</template>
<script>

Loading…
Cancel
Save