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

优化图标菜单组件、临时删除快捷菜单

上级 dc41d946
.app-quick-menus{
.app-icon-menus{
display: flex;
.el-card{
margin-left: 16px;
......@@ -6,13 +6,7 @@
padding: 0;
width: 200px;
height: 122px;
border: 1px rgb(210,238,255) solid;
border-radius: 3px;
margin: 0;
background-color: rgb(240,249,255);
&:hover{
border-color: rgb(53,152,220) !important;
}
.menuIcon{
width: 100%;
height: 100%;
......@@ -20,6 +14,12 @@
justify-content: center;
flex-direction: column;
align-items: center;
border: 1px rgb(210,238,255) solid;
background-color: rgb(240,249,255);
border-radius: 3px;
&:hover{
border-color: rgb(53,152,220) !important;
}
span{
font-size: 40px;
}
......
<template>
<div class="app-quick-menus">
<div class="app-icon-menus">
<template v-for="(item,index) in menus">
<div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index">
<p @click="$emit('menuClick',item.name, [item.name])">
......@@ -7,16 +7,15 @@
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
<app-quick-menus :menus="item.items" :ctrlName = "ctrlName" @menuClick="menuClick"></app-quick-menus>
<app-icon-menus :menus="item.items" :ctrlName = "ctrlName" @menuClick="menuClick"></app-icon-menus>
</p>
</div>
<el-card
:key="index"
shadow="never"
v-else
>
<div @click="menuClick(item.name,[item.name])" class="menuIcon">
<div @click="menuClick(item.name,[item.name])" class="menuIcon" :class="item.textcls">
<span>
<img :src="item.icon" v-if="!Object.is(item.icon, '')" />
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
......
<template>
<div class="app-menus">
<template v-for="(item,index) in menus">
<card :bordered="false" dis-hover v-if="item.items && Array.isArray(item.items)" :key="index">
<p slot="title" @click="$emit('menuClick',item.name, [item.name])">
<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.${ctrlName}.${item.name}`)}}</span>
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
<card
:key="index"
:style=" {
width:'24%',
height: '50px',
wordBreak: 'break-all',
cursor: 'pointer',
margin: '6px',
border:'0',
padding:'8px',
display: 'flex',
alignItems: 'center'
}"
:padding="0"
v-else
>
<div @click="$emit('menuClick',item.name, [item.name])">
<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>
<h4>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</h4>
</div>
</card>
</template>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppQuickMenus extends Vue {
/**
* 菜单数据
*
* @type {*}
* @memberof AppQuickMenus
*/
@Prop({ default: [] }) public menus!: any;
/**
* 部件名称
*
* @type {String}
* @memberof AppQuickMenus
*/
@Prop() public ctrlName!:String;
}
</script>
<style lang='less'>
@import "./app-quick-menus.less";
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册