<template>
  <div id="app">
    <transition name="modal-fade">
      <router-view :key="$route.fullPath" />
    </transition>
  </div>
</template>

<script>
import "@/assets/iconfont/iconfont.css";
export default {
  name: "App",
  watch: {
    $route(to, from) {
      console.log("----------路由变化", to, from);
    }
  },
};
</script>

<style lang="scss">
.modal-fade-enter,
.modal-fade-leave-active {
  opacity: 0;
}

.modal-fade-enter-active,
.modal-fade-leave-active {
  transition: opacity 1s ease;
}
</style>