123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <div class="layer">
- <ly-top class="top" />
- <div class="content">
- <router-view v-slot="{ Component }" v-if="isSystem">
- <component :is="Component" />
- </router-view>
- <template v-else>
- <ly-slide class="slide" :names="menuRouteNames" v-if="!hiddenSlide" />
- <div class="view" :class="{ full: hiddenSlide }">
- <div class="app-wrap m-4" v-if="!hiddenSlide">
- <div
- class="app-scene"
- ref="sceneRef"
- :style="{
- width: '100%',
- height: 'calc(100% - 24px)',
- // display: showScene ? 'none' : 'block'
- }"
- >
- <!-- @load="setupSDK($event.target)" -->
- <iframe
- v-if="sceneURL"
- :src="sceneURL"
- frameborder="0"
- :style="{ width: '100%', height: '100%' }"
- ></iframe>
- </div>
- </div>
- <div class="main p-4">
- <router-view v-slot="{ Component }">
- <component :is="Component" />
- </router-view>
- </div>
- </div>
- </template>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- import lyTop from "./top/index.vue";
- import lySlide from "./slide/index.vue";
- import { routeIsSystem, router } from "@/router";
- import { computed, ref } from "vue";
- import { menuRouteNames } from "@/app";
- import { updateByTreeFileLists } from "@/store/case";
- console.log(menuRouteNames, 'menuRouteNames', router.currentRoute.value.name);
- const sceneURL = ref('https://test.4dkankan.com/spg.html?m=KK-t-iN6cFCdwibf')
- const isSystem = computed(() => routeIsSystem());
- updateByTreeFileLists()
- const hiddenSlide = computed(
- () => !menuRouteNames.includes(router.currentRoute.value.name as string)
- );
- </script>
- <style lang="scss" scoped>
- .layer {
- position: absolute;
- z-index: 1;
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- .top {
- flex: 0 0 auto;
- }
- .content {
- flex: 1 0;
- display: flex;
- overflow: hidden;
- .slide {
- width: 16.66rem;
- flex: 0 0 auto;
- }
- .view {
- flex: 0 0 auto;
- width: calc(100% - 16.66rem);
- background-color: var(--bgColor);
- // flex-direction: column;
- display: flex;
- &.full {
- width: 100%;
- }
- .app-wrap, .app-view {
- width: calc(100% - 320px);
- height: 100%;
- }
- .player {
- flex: 0 0 auto;
- height: 32px;
- }
- .main {
- margin: 0 0px 10px 0;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- flex: 1;
- background: #fff;
- }
- }
- }
- }
- </style>
|