123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <router-view v-slot="{ Component }">
- <!-- <transition>-->
- <keep-alive>
- <component :is="Component" />
- </keep-alive>
- <!-- </transition>-->
- </router-view>
- </template>
- <script lang="ts">
- import {
- defineComponent,
- computed,
- onMounted,
- ref,
- reactive,
- watch,
- getCurrentInstance,
- ComponentInternalInstance,
- toRefs,
- nextTick
- } from 'vue'
- import {useStore} from 'vuex'
- import {useRouter, useRoute} from 'vue-router'
- export default defineComponent({
- name: '',
- components: {},
- setup() {
- const store = useStore();
- const router = useRouter();
- const route = useRoute();
- const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
- const state = reactive({})
- return {
- ...toRefs(state)
- }
- },
- })
- </script>
- <style scoped lang="scss">
- </style>
|