| 1234567891011121314151617181920212223242526272829 |
- <template>
- <section class="app-main">
- <transition name="fade-transform" mode="out-in">
- <keep-alive>
- <router-view :key="key" />
- </keep-alive>
- </transition>
- </section>
- </template>
- <script>
- import { useRoute } from "vue-router";
- export default {
- setup() {
- const route = useRoute();
- function key() {
- return route.path;
- }
- return {
- key,
- };
- },
- };
- </script>
- <style lang="scss" scoped>
- </style>
|