Skip to content

Commit df8a394

Browse files
committed
对齐面包屑的图标和文字
1 parent 4fddbcc commit df8a394

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/Icon/src/Icon.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const getIconifyStyle = computed(() => {
3232
const { color, size } = props
3333
return {
3434
fontSize: `${size}px`,
35+
height: '1em',
3536
color
3637
}
3738
})

src/layout/components/Breadcrumb/src/Breadcrumb.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ export default defineComponent({
5252
return (
5353
<ElBreadcrumbItem to={{ path: disabled ? '' : v.path }} key={v.name}>
5454
{meta?.icon && breadcrumbIcon.value ? (
55-
<>
55+
<div class="flex items-center">
5656
<Icon icon={meta.icon} class="mr-[2px]" svgClass="inline-block"></Icon>
5757
{t(v?.meta?.title)}
58-
</>
58+
</div>
5959
) : (
6060
t(v?.meta?.title)
6161
)}
@@ -114,9 +114,10 @@ $prefix-cls: #{$elNamespace}-breadcrumb;
114114
}
115115
}
116116
}
117-
118117
:deep(&__item):last-child {
119118
.#{$prefix-cls}__inner {
119+
display: flex;
120+
align-items: center;
120121
color: var(--el-text-color-placeholder);
121122
122123
&:hover {

0 commit comments

Comments
 (0)