提交 68087c56 编写于 作者: linjinyang's avatar linjinyang

菜单方向Top 更新

上级 fbdb95a2
......@@ -5,13 +5,111 @@
<div class="app-app-menu">
<el-menu
class="app-menu"
:default-openeds="defaultOpeneds"
<#if view.getMainMenuAlign()?? && view.getMainMenuAlign()!="TOP">:default-openeds="defaultOpeneds"</#if>
:mode="mode"
:menu-trigger="trigger"
:collapse="isCollapse"
@select="select"
:default-active="defaultActive">
<app-menu-item :menus="menus" :ctrlName="'${ctrl.codeName?lower_case}'" :isFirst="true" :counterdata="counterdata" :popperclass="popperClass"></app-menu-item>
<template v-if="Object.is(mode,'horizontal')">
<template v-for="item0 in menus">
<template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0">
<el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id">
<template slot='title'>
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<span class='text' :title="$t('app.menus.appindexview.' + item0.name)">{{$t('app.menus.appindexview.' + item0.name)}}</span>
</template>
<template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
<el-submenu v-show="!item1.hidden" :index="item1.name" :popper-class="popperClass" :key="item1.id">
<template slot='title'>
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<span class='text' :title="$t('app.menus.appindexview.' + item1.name)">{{$t('app.menus.appindexview.' + item1.name)}}</span>
</template>
<template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'">
<el-menu-item v-show="!item2.hidden" :index="item2.name" :key="item2.id">
<template v-if="item2.icon && item2.icon != ''">
<img :src="item2.icon" class='app-menu-icon' />
</template>
<template v-else-if="item2.iconcls && item2.iconcls != ''">
<i :class="[item2.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item2.name)">{{$t('app.menus.appindexview.' + item2.name)}}</span>
<template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id">
<template v-if="item1.icon && item1.icon != ''">
<img :src="item1.icon" class='app-menu-icon' />
</template>
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item1.name)">{{$t('app.menus.appindexview.' + item1.name)}} </span>
<template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</el-submenu>
</template>
<template v-else>
<template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id">
<template v-if="item0.icon && item0.icon != ''">
<img :src="item0.icon" class='app-menu-icon' />
</template>
<template v-else-if="item0.iconcls && item0.iconcls != ''">
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.appindexview.' + item0.name)">{{$t('app.menus.appindexview.' + item0.name)}}</span>
<template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
</span>
</template>
</template>
</el-menu-item>
</template>
</template>
</template>
</template>
<app-menu-item v-else :menus="menus" :ctrlName="'appindexview'" :isFirst="true" :counterdata="counterdata" :popperclass="popperClass"></app-menu-item>
</el-menu>
</div>
</#if>
......
......@@ -73,6 +73,22 @@
overflow: hidden;
}
}
.el-menu--horizontal{
display: flex;
width: calc(100vw - 1100px);
height: 65px;
flex-wrap: nowrap;
overflow:scroll;
.el-menu-item{
overflow: visible;
}
.el-submenu{
.el-submenu__title{
padding-right: 0px !important;
padding-left: 0px !important;
}
}
}
.ivu-divider-horizontal {
width: 100%;
min-width: 100%;
......
......@@ -13,6 +13,12 @@
overflow: hidden;
color:#303133;
background-color: #fff;
.horizontal{
.view-container{
height: calc(100% - 32px);
margin: 12px;
}
}
.index_header{
height:65px;
padding:0 20px;
......
......@@ -61,7 +61,7 @@
<img src="../../../assets/img/logo.png" height="32" />
<span style="display: inline-block;margin-left: 10px;font-size: 22px;">{{$t(model.srfCaption)}}</span>
</div>
<div style="margin-left: 50px;">
<div <#if view.getMainMenuAlign()?? && view.getMainMenuAlign()!="TOP">style="margin-left: 50px;"</#if>>
${P.getCtrlCode('appmenu', 'CONTROL.html').code}
</div>
</div>
......@@ -73,7 +73,7 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content style="height:calc(100vh - 50px);" @click="contextMenuDragVisiable=false">
<content <#if view.getMainMenuAlign()?? && view.getMainMenuAlign()=="TOP">class="horizontal"</#if> style="height:calc(100vh - 50px);" @click="contextMenuDragVisiable=false">
<router-view></router-view>
</content>
</layout>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册