-我在我的 app.module 中添加了 Primeng 的 BreadcrumbModule 以及我在其中使用它的组件(也使用 Primeng 主题 + Flex) -我查找了不同的论坛帖子但找不到任何解决方案 -还尝试将其隐藏在我的CSS中,但要么我的代码错误,要么你无法真正隐藏它: -经过研究,我只能发现这部分是由“li.p-breadcrumb-chevron.pi-circle-fill.ng-star-inserted::before”生成的
html代码:
<p-breadcrumb [model]="breadcrumbItems" [home]="home">
</p-breadcrumb>
.ts代码:
this.home = { icon: 'pi pi-home', routerLink: "/"};
this.breadcrumbItems = [
{ label: "System", routerLink: "component1"},
{label: "user", routerLink: "component2"}
];
BrowserAnimationModule
可能是添加此类的罪魁祸首,无论如何你可以通过使用下面的 CSS 来摆脱它
global styles.css(修复全局样式)
li.p-breadcrumb-chevron .ng-star-inserted {
display: none !important;
}
使用
::ng-deep
修复组件 scss 文件
::ng-deep li.p-breadcrumb-chevron .ng-star-inserted {
display: none !important;
}