This commit is contained in:
2025-02-28 10:39:19 +08:00
parent 7ee9396255
commit 3f38f1bb73

View File

@@ -4,12 +4,26 @@
<template> <template>
<div class="w-full h-screen relative flex justify-center items-center"> <div class="w-full h-screen relative flex justify-center items-center">
<img class="w-full h-full absolute left-0 top-0 -z-10 object-cover" src="../../assets/images/背景.png" alt="" /> <img class="w-full h-full absolute left-0 top-0 -z-10 object-cover" src="../../assets/images/背景.png" alt=""/>
<router-view></router-view> <router-view v-slot="{ Component, route }">
<transition name="fade">
<component :is="Component" :key="route.path"/>
</transition>
</router-view>
</div> </div>
</template> </template>
<style scoped> <style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s ease;
position: relative;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
position: absolute;
}
</style> </style>