经过多次尝试,最终成功的是将徽章移出
<i (click)="showAllNotifications()" class="pi pi-bell" style="margin-top: 15px; font-size: 2rem"> <p-badge [severity]="badgeSeverity" [value]="badgeCount.toString()"></p-badge> </i>
为什么?不知道。 :)