|
@@ -3,9 +3,12 @@
|
|
|
<div class="bg">
|
|
|
<HeaderSection />
|
|
|
<div class="dashboard-content">
|
|
|
- <LeftSection />
|
|
|
- <MiddleSection />
|
|
|
- <RightSection />
|
|
|
+ <LeftSection v-show="showLeftSection" />
|
|
|
+ <MiddleSection>
|
|
|
+ <i class="left-icon" @click="handleTelescoping('left')" />
|
|
|
+ <i class="right-icon" @click="handleTelescoping('right')" />
|
|
|
+ </MiddleSection>
|
|
|
+ <RightSection v-show="showRightSection" />
|
|
|
</div>
|
|
|
<FooterSection style="position: absolute; bottom: 0; left: 0" />
|
|
|
</div>
|
|
@@ -18,9 +21,24 @@ import RightSection from './RightSection/index.vue';
|
|
|
import MiddleSection from './MiddleSection.vue';
|
|
|
import autofit from 'autofit.js';
|
|
|
import { getTransformScale } from '@/utils';
|
|
|
+import useAppStore from '@/store/modules/app';
|
|
|
|
|
|
+const appStore = useAppStore();
|
|
|
const containerRef = ref();
|
|
|
let scale = ref({ scaleX: 1, scaleY: 1 });
|
|
|
+let showLeftSection = computed(() => {
|
|
|
+ return appStore.showLeftSection;
|
|
|
+});
|
|
|
+let showRightSection = computed(() => {
|
|
|
+ return appStore.showRightSection;
|
|
|
+});
|
|
|
+const handleTelescoping = (type: string) => {
|
|
|
+ if (type === 'left') {
|
|
|
+ appStore.toggleLeftSection();
|
|
|
+ } else if (type === 'right') {
|
|
|
+ appStore.toggleRightSection();
|
|
|
+ }
|
|
|
+};
|
|
|
provide('containerScale', () => scale.value);
|
|
|
onMounted(() => {
|
|
|
if (location.hostname != 'localhost___') {
|
|
@@ -66,4 +84,27 @@ onUnmounted(() => {
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
}
|
|
|
+.left-icon {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 110px;
|
|
|
+ left: 0;
|
|
|
+ z-index: 9;
|
|
|
+ width: 152px;
|
|
|
+ height: 158px;
|
|
|
+ background: url('@/assets/images/left.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.right-icon {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 110px;
|
|
|
+ right: 0;
|
|
|
+ z-index: 9;
|
|
|
+ width: 152px;
|
|
|
+ height: 158px;
|
|
|
+ background: url('@/assets/images/right.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|