|
@@ -4,9 +4,10 @@
|
|
|
v-if="!sider && inPage"
|
|
v-if="!sider && inPage"
|
|
|
class="w-full h-full flex overflow-hidden box-border"
|
|
class="w-full h-full flex overflow-hidden box-border"
|
|
|
:style="styleMap?.mainStyle"
|
|
:style="styleMap?.mainStyle"
|
|
|
- :class="titleMode === 'bottom_fixed' ? 'flex-col-reverse' : 'flex-col'"
|
|
|
|
|
|
|
+ :class="titleMode === 'LV_MENU_HEADER_BOTTOM_FIXED' ? 'flex-col-reverse' : 'flex-col'"
|
|
|
>
|
|
>
|
|
|
<div
|
|
<div
|
|
|
|
|
+ v-if="openTitle"
|
|
|
class="menu-header w-full px-18px relative whitespace-pre! flex items-center box-border"
|
|
class="menu-header w-full px-18px relative whitespace-pre! flex items-center box-border"
|
|
|
:style="styleMap?.menuTitleStyle"
|
|
:style="styleMap?.menuTitleStyle"
|
|
|
>
|
|
>
|
|
@@ -22,11 +23,15 @@
|
|
|
class="shrink-0 box-border relative flex flex-col"
|
|
class="shrink-0 box-border relative flex flex-col"
|
|
|
:class="!sider ? 'flex-1! border-r-none!' : 'basis-1/3'"
|
|
:class="!sider ? 'flex-1! border-r-none!' : 'basis-1/3'"
|
|
|
style="border-right: solid 1px #ededed"
|
|
style="border-right: solid 1px #ededed"
|
|
|
- :style="titleMode === 'bottom_fixed' ? 'flex-direction: column-reverse;' : ''"
|
|
|
|
|
|
|
+ :style="titleMode === 'LV_MENU_HEADER_BOTTOM_FIXED' ? 'flex-direction: column-reverse;' : ''"
|
|
|
>
|
|
>
|
|
|
<ImageBg :src="styleMap?.mainStyle?.imageSrc" :imageStyle="styleMap?.mainStyle?.imageStyle" />
|
|
<ImageBg :src="styleMap?.mainStyle?.imageSrc" :imageStyle="styleMap?.mainStyle?.imageStyle" />
|
|
|
<!-- 菜单标题 -->
|
|
<!-- 菜单标题 -->
|
|
|
- <div class="menu-header relative whitespace-pre!" :style="styleMap?.menuTitleStyle">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="openTitle"
|
|
|
|
|
+ class="menu-header relative whitespace-pre!"
|
|
|
|
|
+ :style="styleMap?.menuTitleStyle"
|
|
|
|
|
+ >
|
|
|
<ImageBg
|
|
<ImageBg
|
|
|
:src="styleMap?.menuTitleStyle?.imageSrc"
|
|
:src="styleMap?.menuTitleStyle?.imageSrc"
|
|
|
:imageStyle="styleMap?.menuTitleStyle?.imageStyle"
|
|
:imageStyle="styleMap?.menuTitleStyle?.imageStyle"
|
|
@@ -37,7 +42,7 @@
|
|
|
<div
|
|
<div
|
|
|
ref="sidebarRef"
|
|
ref="sidebarRef"
|
|
|
:style="styleMap?.sidebarStyle"
|
|
:style="styleMap?.sidebarStyle"
|
|
|
- :class="titleMode === 'bottom_fixed' ? 'flex-1' : ''"
|
|
|
|
|
|
|
+ :class="titleMode === 'LV_MENU_HEADER_BOTTOM_FIXED' ? 'flex-1' : ''"
|
|
|
class="menu-sidebar relative box-border overflow-hidden"
|
|
class="menu-sidebar relative box-border overflow-hidden"
|
|
|
>
|
|
>
|
|
|
<ImageBg
|
|
<ImageBg
|
|
@@ -100,10 +105,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 滚动条 -->
|
|
<!-- 滚动条 -->
|
|
|
<div
|
|
<div
|
|
|
- v-if="showVScroll"
|
|
|
|
|
|
|
+ v-if="showVScroll && titleMode !== 'LV_MENU_HEADER_TOP_UNFIXED'"
|
|
|
class="v-scrollbar absolute right-6px top-6px w-4px h-20% bg-#d7d7d7"
|
|
class="v-scrollbar absolute right-6px top-6px w-4px h-20% bg-#d7d7d7"
|
|
|
></div>
|
|
></div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 滚动条 -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="showVScroll && titleMode === 'LV_MENU_HEADER_TOP_UNFIXED'"
|
|
|
|
|
+ class="v-scrollbar absolute right-6px top-6px w-4px h-20% bg-#d7d7d7"
|
|
|
|
|
+ ></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="sider" class="basis-2/3"></div>
|
|
<div v-if="sider" class="basis-2/3"></div>
|
|
|
</div>
|
|
</div>
|
|
@@ -130,13 +140,18 @@ const props = defineProps<{
|
|
|
title: string
|
|
title: string
|
|
|
// 折叠展开
|
|
// 折叠展开
|
|
|
sider: boolean
|
|
sider: boolean
|
|
|
|
|
+ // 标题开关
|
|
|
|
|
+ openTitle?: boolean
|
|
|
// 子标题开关
|
|
// 子标题开关
|
|
|
openSection: boolean
|
|
openSection: boolean
|
|
|
// 子项
|
|
// 子项
|
|
|
children?: any[]
|
|
children?: any[]
|
|
|
// 当前激活index
|
|
// 当前激活index
|
|
|
activeIndex: string
|
|
activeIndex: string
|
|
|
- titleMode?: 'top_fixed' | 'bottom_fixed'
|
|
|
|
|
|
|
+ titleMode?:
|
|
|
|
|
+ | 'LV_MENU_HEADER_TOP_FIXED'
|
|
|
|
|
+ | 'LV_MENU_HEADER_BOTTOM_FIXED'
|
|
|
|
|
+ | 'LV_MENU_HEADER_TOP_UNFIXED'
|
|
|
inPage?: boolean
|
|
inPage?: boolean
|
|
|
}>()
|
|
}>()
|
|
|
|
|
|