fix(components): [el-menu] icon style (#4122)

This commit is contained in:
SongWuKong 2021-10-31 01:35:50 +08:00 committed by GitHub
parent 22e960d34b
commit c728e25cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View File

@ -363,7 +363,7 @@ export default defineComponent({
h(
ElIcon,
{
class: ['is-icon-more', 'el-sub-menu__icon-more'],
class: ['el-sub-menu__icon-more'],
},
() => [h(More)]
),

View File

@ -301,7 +301,7 @@ export default defineComponent({
{
class: ['el-sub-menu__icon-arrow'],
},
() => [subMenuTitleIcon.value]
() => [h(subMenuTitleIcon.value)]
),
]

View File

@ -5,6 +5,8 @@
@use 'common/transition';
@mixin menu-item {
display: flex;
align-items: center;
height: 56px;
line-height: 56px;
font-size: var(--el-menu-item-font-size);
@ -20,7 +22,7 @@
white-space: nowrap;
* {
vertical-align: middle;
vertical-align: bottom;
}
i {
@ -149,7 +151,7 @@
> .#{$namespace}-menu-item,
> .#{$namespace}-sub-menu > .#{$namespace}-sub-menu__title {
[class^='is-icon-'] {
[class^='#{$namespace}-icon'] {
margin: 0;
vertical-align: middle;
width: 24px;
@ -215,7 +217,7 @@
@include b(menu-item) {
@include menu-item;
& [class^='is-icon-'] {
& [class^='#{$namespace}-icon'] {
margin-right: 5px;
width: 24px;
text-align: center;
@ -265,7 +267,9 @@
right: 20px;
margin-top: -7px;
transition: transform var(--el-transition-duration);
font-size: 12px;
font-size: 12px !important;
margin-right: 0 !important;
width: inherit !important;
}
@include when(active) {
.#{$namespace}-sub-menu__title {
@ -285,7 +289,7 @@
background: none !important;
}
}
[class^='is-icon-'] {
[class^='#{$namespace}-icon'] {
vertical-align: middle;
margin-right: 5px;
width: 24px;