|
|
@@ -11,27 +11,20 @@
|
|
|
<div class="view" :class="{ full: hiddenSlide }">
|
|
|
<div class="main" :class="{ fullmain: hiddenSlide }">
|
|
|
<router-view v-slot="{ Component }">
|
|
|
- <component :is="Component" />
|
|
|
+ <keep-alive>
|
|
|
+ <component
|
|
|
+ :is="Component"
|
|
|
+ v-if="isKeep"
|
|
|
+ />
|
|
|
+ </keep-alive>
|
|
|
+
|
|
|
+ <!-- 不需要缓存的页面 -->
|
|
|
+ <component
|
|
|
+ :is="Component"
|
|
|
+ v-if="!isKeep"
|
|
|
+ />
|
|
|
</router-view>
|
|
|
</div>
|
|
|
- <!-- <div class="app-wrap m-4" v-if="!hiddenSlide">
|
|
|
- <div
|
|
|
- class="app-scene"
|
|
|
- ref="sceneRef"
|
|
|
- :style="{
|
|
|
- width: '100%',
|
|
|
- height: 'calc(100% - 24px)',
|
|
|
- }"
|
|
|
- >
|
|
|
- <iframe
|
|
|
- v-if="caseId"
|
|
|
- :key="qpisceneList.length"
|
|
|
- :src="'https://survey.4dkankan.com' + sceneURL"
|
|
|
- frameborder="0"
|
|
|
- :style="{ width: '100%', height: '100%' }"
|
|
|
- ></iframe>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -55,7 +48,7 @@ import {
|
|
|
Extract,
|
|
|
} from "@/store/case";
|
|
|
import { json } from "stream/consumers";
|
|
|
-console.log(menuRouteNames, "menuRouteNames", router.currentRoute.value.name);
|
|
|
+console.log(menuRouteNames, "menuRouteNames", router.currentRoute.value.meta);
|
|
|
const isSystem = computed(() => routeIsSystem());
|
|
|
const caseId = computed(() => {
|
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
|
@@ -105,6 +98,9 @@ onMounted(() => {
|
|
|
// setupSDK(document.querySelector('iframe') as HTMLIFrameElement)
|
|
|
});
|
|
|
updateByTreeFileLists();
|
|
|
+const isKeep = computed(
|
|
|
+ () => router.currentRoute.value.meta?.keepAlive || false
|
|
|
+);
|
|
|
const hiddenSlide = computed(
|
|
|
() => !menuRouteNames.includes(router.currentRoute.value.name as string)
|
|
|
);
|