提交 4df1a10a 编写于 作者: RedPing97's avatar RedPing97

新增图标菜单功能

上级 a2a2623e
...@@ -12,6 +12,24 @@ ...@@ -12,6 +12,24 @@
@select="select" @select="select"
:default-active="defaultActive"> :default-active="defaultActive">
<template v-if="Object.is(mode,'horizontal')"> <template v-if="Object.is(mode,'horizontal')">
<#if ctrl.getPSAppMenu().getAppMenuStyle() == "ICONVIEW">
<template v-for="(item,index) in menus" >
<card :bordered="false" dis-hover :key = "index">
<p slot='title' @click="select(item.name, [item.name])" class="menuIcon">
<span style="margin-right:12px">
<img :src="item.icon" v-if="!Object.is(item.icon, '')"/>
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')"/>
<i class='fa fa-cogs' v-else></i>
</span>
<span>{{$t('app.menus.iconmenu.' + item.name)}}</span>
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
<app-quick-menus :menus = "item.items" :ctrlName = "'${ctrl.codeName?lower_case}'" v-if="item.items" @menuClick="select(item.name, [item.name])"></app-quick-menus>
</p>
</card>
</template>
</#else>
<template v-for="item0 in menus"> <template v-for="item0 in menus">
<template v-if="item0.items && Array.isArray(item0.items) && item0.items.length > 0"> <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"> <el-submenu v-show="!item0.hidden" :index="item0.name" :popper-class="popperClass" :key="item0.id" :class="item0.textcls">
...@@ -110,6 +128,7 @@ ...@@ -110,6 +128,7 @@
</template> </template>
</template> </template>
<app-menu-item v-else :isCollapse="isCollapse" :menus="menus" :ctrlName="'${ctrl.getCodeName()?lower_case}'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item> <app-menu-item v-else :isCollapse="isCollapse" :menus="menus" :ctrlName="'${ctrl.getCodeName()?lower_case}'" :isFirst="true" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</#if>
</el-menu> </el-menu>
</div> </div>
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册