AppMain.vue 661 Bytes
<template>
  <section class="app-main">
    <transition name="fade-transform" mode="out-in">
      <router-view :key="key" />
    </transition>
  </section>
</template>

<script>
export default {
  name: 'AppMain',
  data() {
    return {
      visible: true
    }
  },
  computed: {
    key() {
      return this.$route.fullPath
    }
  }
}
</script>

<style scoped>
.app-main {
  /* height: calc(100% - 35px); */
  padding: 24px 24px 0 24px;
  background-color: #f0f2f5;
}
/* 定义过渡时间 */
.fade-transform-enter-active,
.fade-transform-live-active {
  transition: all 0.5s;
}

.fade-transform-enter,
.fade-transform-live-to {
  opacity: 0;
}
</style>