对齐面包屑的图标和文字

(cherry picked from commit 4c077711a1)
This commit is contained in:
owen 2023-10-02 11:03:46 +08:00 committed by shizhong
parent 6a8aa02960
commit d4a9f844dc
2 changed files with 5 additions and 3 deletions

View File

@ -32,6 +32,7 @@ const getIconifyStyle = computed(() => {
const { color, size } = props const { color, size } = props
return { return {
fontSize: `${size}px`, fontSize: `${size}px`,
height: '1em',
color color
} }
}) })

View File

@ -52,10 +52,10 @@ export default defineComponent({
return ( return (
<ElBreadcrumbItem to={{ path: disabled ? '' : v.path }} key={v.name}> <ElBreadcrumbItem to={{ path: disabled ? '' : v.path }} key={v.name}>
{meta?.icon && breadcrumbIcon.value ? ( {meta?.icon && breadcrumbIcon.value ? (
<> <div class="flex items-center">
<Icon icon={meta.icon} class="mr-[2px]" svgClass="inline-block"></Icon> <Icon icon={meta.icon} class="mr-[2px]" svgClass="inline-block"></Icon>
{t(v?.meta?.title)} {t(v?.meta?.title)}
</> </div>
) : ( ) : (
t(v?.meta?.title) t(v?.meta?.title)
)} )}
@ -114,9 +114,10 @@ $prefix-cls: #{$elNamespace}-breadcrumb;
} }
} }
} }
:deep(&__item):last-child { :deep(&__item):last-child {
.#{$prefix-cls}__inner { .#{$prefix-cls}__inner {
display: flex;
align-items: center;
color: var(--el-text-color-placeholder); color: var(--el-text-color-placeholder);
&:hover { &:hover {