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

优化快捷菜单组件---fix1

上级 ee23a5c8
.app-quick-menus{
display: flex;
.menuIcon{
padding: 0px;
display: flex;
width: 140px;
height: 80px;
border: 1px #F68080 solid;
align-items: center;
margin: 0;
background-color: #FCCFCF;
justify-content: space-around;
flex-direction: column;
span{
font-size: 40px;
}
}
}
<template> <template>
<div class="app-menus"> <div class="app-quick-menus">
<template v-for="(item,index) in menus"> <template v-for="(item,index) in menus">
<card :bordered="false" dis-hover v-if="item.items && Array.isArray(item.items)" :key="index"> <card :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index">
<p slot="title" @click="$emit('menuClick',item.name, [item.name])"> <p slot="title" @click="$emit('menuClick',item.name, [item.name])">
<span style="margin-right:12px"> <span style="margin-right:12px">
<img :src="item.icon" v-if="!Object.is(item.icon, '')" /> <img :src="item.icon" v-if="!Object.is(item.icon, '')" />
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i> <i class="fa fa-cogs" v-else></i>
</span> </span>
<span>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span> <span>{{$t('app.menus.iconmenu.' + item.name)}}</span>
<span class="line"></span> <span class="line"></span>
</p> </p>
<p style=" display: 'flex' "> <p style=" display: 'flex' ">
...@@ -18,26 +18,26 @@ ...@@ -18,26 +18,26 @@
<card <card
:key="index" :key="index"
:style=" { :style=" {
width:'24%', width:'140px',
height: '50px', height: '80px',
wordBreak: 'break-all', wordBreak: 'break-all',
cursor: 'pointer', cursor: 'pointer',
margin: '6px', marginLeft: '20px',
border:'0', border:'0',
padding:'8px', padding:'0',
display: 'flex', display: 'flex',
alignItems: 'center' alignItems: 'center'
}" }"
:padding="0" :padding="0"
v-else v-else
> >
<div @click="$emit('menuClick',item.name, [item.name])"> <div @click="$emit('menuClick',item.name, [item.name])" class="menuIcon">
<span style="margin-right:12px"> <span>
<img :src="item.icon" v-if="!Object.is(item.icon, '')" /> <img :src="item.icon" v-if="!Object.is(item.icon, '')" />
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" /> <img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i> <i class="fa fa-cogs" v-else></i>
</span> </span>
<h4>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</h4> <h4>{{$t('app.menus.iconmenu.' + item.name)}}</h4>
</div> </div>
</card> </card>
</template> </template>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册