<script setup lang="ts">
import { watch } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute()
watch(() => route.query, () => {
  console.log(123)
  if (!localStorage.getItem('isDetailRefresh')) {
		localStorage.setItem('isDetailRefresh', '1')
    window.location.reload()
	}
})
</script>

<template>
  <Suspense>
    <template #default>
      <router-view v-slot="{ Component }">
        <keep-alive>
          <component :is="Component" />
        </keep-alive>
      </router-view>
    </template>
    <template #fallback>
      <div>
        加载中...
      </div>
    </template>
  </Suspense>
</template>

<style scoped>

</style>
