|
@@ -1,11 +1,20 @@
|
|
|
<template>
|
|
|
<template v-if="loaded">
|
|
|
+ <ui-icon
|
|
|
+ class="screen-full"
|
|
|
+ v-if="params.pure"
|
|
|
+ :class="{ pure: params.pure }"
|
|
|
+ style="margin-right: 10px"
|
|
|
+ :type="fullScreen ? 'window_n' : 'window_m'"
|
|
|
+ ctrl
|
|
|
+ @click="fullHandler"
|
|
|
+ />
|
|
|
<div
|
|
|
:class="{ hideLeft: !custom.showLeftPano }"
|
|
|
:style="hasSingle ? { '--left-pano-left': '0px' } : ''"
|
|
|
>
|
|
|
<SlideMenu
|
|
|
- v-if="!hasSingle"
|
|
|
+ v-if="!hasSingle && !custom.full"
|
|
|
:activeName="(router.currentRoute.value.name as RoutesName)"
|
|
|
@change-item="(item) => router.push({ name: item.name })"
|
|
|
/>
|
|
@@ -24,7 +33,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import GlobalSearch from "@/components/global-search/index.vue";
|
|
|
import ViewSetting from "@/components/view-setting/index.vue";
|
|
|
-import { custom, showRightPanoStack } from "@/env";
|
|
|
+import { custom, params, showRightPanoStack } from "@/env";
|
|
|
import { ref, watchEffect } from "vue";
|
|
|
import { router, RoutesName } from "@/router";
|
|
|
import { loadModel, fuseModel } from "@/model";
|
|
@@ -50,6 +59,8 @@ import {
|
|
|
initMonitors,
|
|
|
} from "@/store";
|
|
|
import { initialAnimationModels } from "@/store/animation";
|
|
|
+import { fullView } from "@/utils/full";
|
|
|
+import { watch } from "fs";
|
|
|
|
|
|
const hasSingle = new URLSearchParams(location.search).has("single");
|
|
|
|
|
@@ -59,6 +70,22 @@ watchEffect((onCleanup) => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+const fullScreen = ref(false);
|
|
|
+let quit: (() => void) | null = null;
|
|
|
+const fullHandler = async () => {
|
|
|
+ if (quit) {
|
|
|
+ quit();
|
|
|
+ fullScreen.value = false;
|
|
|
+ quit = null;
|
|
|
+ } else {
|
|
|
+ quit = await fullView(() => {
|
|
|
+ fullScreen.value = false;
|
|
|
+ quit = null;
|
|
|
+ });
|
|
|
+ fullScreen.value = true;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const loaded = ref(false);
|
|
|
const initialSys = async () => {
|
|
|
await Promise.all([
|
|
@@ -114,4 +141,13 @@ watchEffect((onCleanup) => {
|
|
|
z-index: 99;
|
|
|
right: calc(var(--editor-menu-right) + var(--editor-toolbox-width) + 20px);
|
|
|
}
|
|
|
+
|
|
|
+.screen-full {
|
|
|
+ position: fixed;
|
|
|
+ right: 20px;
|
|
|
+ top: 20px;
|
|
|
+ z-index: 999;
|
|
|
+ font-size: 22px;
|
|
|
+ color: #fff !important;
|
|
|
+}
|
|
|
</style>
|