|
@@ -1,10 +1,14 @@
|
|
|
<template>
|
|
|
- <MainPanel :menus="menus as any" :active-menu-key="activeMenuKey">
|
|
|
+ <MainPanel :menus="store.menus as any" :active-menu-key="store.activeMenuKey.value">
|
|
|
<template v-slot:header>
|
|
|
<Header />
|
|
|
</template>
|
|
|
<Container />
|
|
|
- <ChildMenus v-if="extendMenus" :menus="extendMenus" @quit="extendMenus = null" />
|
|
|
+ <ChildMenus
|
|
|
+ v-if="store.child.value"
|
|
|
+ :menus="store.child.value as any"
|
|
|
+ @quit="store.child.value = null"
|
|
|
+ />
|
|
|
|
|
|
<GraphicAction class="full-action">
|
|
|
<ui-icon
|
|
@@ -25,17 +29,18 @@ import Container from './container.vue'
|
|
|
import GraphicAction from '@/components/button-pane/index.vue'
|
|
|
import UiIcon from "@/components/base/components/icon/index.vue";
|
|
|
import VectorMenus from './vectorMenus.vue'
|
|
|
+import {router} from '@/router'
|
|
|
|
|
|
-import {computed, watch, watchEffect} from "vue";
|
|
|
-import { customMap } from '@/hook'
|
|
|
-import { generateMixMenus, UITypeExtend, focusMenuRaw } from './menus'
|
|
|
-import { currentVector } from "@/hook/useGraphic";
|
|
|
+import {computed} from "vue";
|
|
|
+import {customMap} from '@/hook'
|
|
|
+import {focusMenuRaw, generateMixMenus, mainMenusRaw, photoMenusRaw, Mode, UITypeExtend} from './menus'
|
|
|
+import {currentVector} from "@/hook/useGraphic";
|
|
|
|
|
|
-const {
|
|
|
- child: extendMenus,
|
|
|
- menus,
|
|
|
- activeMenuKey
|
|
|
-} = generateMixMenus(
|
|
|
+const menusRaws = computed(() => {
|
|
|
+ const mode = Number(router.currentRoute.value.params.mode) as Mode
|
|
|
+ return mode === Mode.Photo ? photoMenusRaw : mainMenusRaw
|
|
|
+})
|
|
|
+const store = computed(() => generateMixMenus(
|
|
|
"extend",
|
|
|
(mainMenuRaw) => ({
|
|
|
title: mainMenuRaw.text,
|
|
@@ -44,10 +49,11 @@ const {
|
|
|
icon: 'menu',
|
|
|
bottom: mainMenuRaw.key === UITypeExtend.photo
|
|
|
}),
|
|
|
-)
|
|
|
+ menusRaws.value
|
|
|
+))
|
|
|
+
|
|
|
|
|
|
const focusMenus = computed(() => {
|
|
|
- console.warn(focusMenuRaw[currentVector.value?.type])
|
|
|
return focusMenuRaw[currentVector.value?.type]
|
|
|
})
|
|
|
const isFull = computed(() => customMap.sysView === 'full' )
|