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

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

上级 dc41d946
.app-quick-menus{ .app-icon-menus{
display: flex; display: flex;
.el-card{ .el-card{
margin-left: 16px; margin-left: 16px;
...@@ -6,13 +6,7 @@ ...@@ -6,13 +6,7 @@
padding: 0; padding: 0;
width: 200px; width: 200px;
height: 122px; height: 122px;
border: 1px rgb(210,238,255) solid;
border-radius: 3px;
margin: 0; margin: 0;
background-color: rgb(240,249,255);
&:hover{
border-color: rgb(53,152,220) !important;
}
.menuIcon{ .menuIcon{
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -20,6 +14,12 @@ ...@@ -20,6 +14,12 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
align-items: center; 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{ span{
font-size: 40px; font-size: 40px;
} }
......
<template> <template>
<div class="app-quick-menus"> <div class="app-icon-menus">
<template v-for="(item,index) in menus"> <template v-for="(item,index) in menus">
<div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index"> <div :bordered="false" v-if="item.items && Array.isArray(item.items)" :key="index">
<p @click="$emit('menuClick',item.name, [item.name])"> <p @click="$emit('menuClick',item.name, [item.name])">
...@@ -7,16 +7,15 @@ ...@@ -7,16 +7,15 @@
<span class="line"></span> <span class="line"></span>
</p> </p>
<p style=" display: 'flex' "> <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> </p>
</div> </div>
<el-card <el-card
:key="index" :key="index"
shadow="never" shadow="never"
v-else v-else
> >
<div @click="menuClick(item.name,[item.name])" class="menuIcon"> <div @click="menuClick(item.name,[item.name])" class="menuIcon" :class="item.textcls">
<span> <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, '')" />
......
<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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册