1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-07 18:25:45 +08:00

Inserted line breaks in side menu (#915)

* changed hover styling of card

* improved styling of menu cards

* other minor styling improvements in cards layout

* Fields always have same size

* style fix active-inactive text in yes-no-field

* moved popover to own component

* refactored labelPopover

* added info icon to label

* truncated placeholder

* bugfix - added missing method back in

* set resizable in textareas to false

* style fix for context info

* fixes due to merge form develop

* reverted padding for context info box

* inserted line breaks in side menu
This commit is contained in:
Sofia Calderon 2021-06-12 07:19:30 +10:00 committed by GitHub
parent f4c9df712e
commit 0b0d6a5f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 20 deletions

View File

@ -61,7 +61,6 @@
</template>
<script>
import { DEFAULT_SIZE } from '@/utils/ADempiere/references'
import { evalutateTypeField, fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
import FieldOptions from '@/components/ADempiere/Field/FieldOptions'

View File

@ -1,7 +1,19 @@
<template>
<el-row class="item-wrapper">
<el-col :span="3">
<i v-if="icon.includes('el-icon')" class="icon sub-el-icon" />
<svg-icon v-else :icon-class="icon" />
</el-col>
<el-col :span="21">
<p class="item-title">{{ title }}</p>
</el-col>
</el-row>
</template>
<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
@ -11,31 +23,24 @@ export default {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
if (icon) {
if (icon.includes('el-icon')) {
vnodes.push(<i class={[icon, 'sub-el-icon']} />)
} else {
vnodes.push(<svg-icon icon-class={icon}/>)
}
}
if (title) {
vnodes.push(<span slot='title'>{(title)}</span>)
}
return vnodes
}
}
</script>
<style scoped>
.sub-el-icon {
color: currentColor;
width: 1em;
height: 1em;
}
.item-wrapper {
white-space: break-spaces;
line-height: 20px;
height: auto;
margin: 18px 23px 18px 0;
}
.item-title {
margin: 0 0 0 7px;
}
</style>

View File

@ -68,6 +68,15 @@
width: 100% !important;
}
.el-menu-item {
height: auto !important;
padding: 0;
}
.el-submenu__title {
height: auto !important;
}
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {