提交 d9940792 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新应用菜单

上级 cce307d5
...@@ -13,109 +13,10 @@ ...@@ -13,109 +13,10 @@
:mode="mode" :mode="mode"
:menu-trigger="trigger" :menu-trigger="trigger"
:collapse="isCollapse" :collapse="isCollapse"
@select="select" :collapse-transition="false"
:default-active="defaultActive"> :default-active="defaultActive"
<template v-if="Object.is(mode,'horizontal')"> @select="select">
<template v-for="item0 in menus"> <app-menu-item :isCollapse="isCollapse" :menus="menus" ctrlName="${ctrl.getCodeName()?lower_case}" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
<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" :class="item0.textcls">
<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='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + 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" :class="item1.textcls">
<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.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + 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" :class="item2.textcls">
<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.${ctrl.getCodeName()?lower_case}.' + item2.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + 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" :class="item1.textcls">
<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.${ctrl.getCodeName()?lower_case}.' + item1.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + 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" :class="item0.textcls">
<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='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + 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 class="el-menu--vertical" :isCollapse="isCollapse" :menus="menus" :ctrlName="'${ctrl.getCodeName()?lower_case}'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-menu> </el-menu>
</#if> </#if>
</#if> </#if>
...@@ -636,7 +537,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code} ...@@ -636,7 +537,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
get popperClass(): string { get popperClass(): string {
return 'app-popper-menu ' + this.selectTheme; return `app-popper-menu app-popper-menu--${this.mode}`;
} }
<#ibizinclude> <#ibizinclude>
......
// 基于 @CONTROL/应用菜单/CONTROL.scss.ftl 生成 // 基于 @CONTROL/应用菜单/CONTROL.scss.ftl 生成
.app-menu {
.app-menu-icon {
width: 20px;
font-size: 14px;
margin-right: 6px;
}
&.app-menu--vertical {
border-right: none;
background-color: #001529;
&.el-menu--collapse {
.el-menu-item,
.el-submenu__title {
overflow: auto;
}
.el-submenu__icon-arrow {
display: none;
}
}
}
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.scss.ftl ../@MACRO/CSS/DEFAULT.scss.ftl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册