我正在使用 Angular PrimeNG 编写一些代码,但在使用 p-carousel 时遇到了问题。问题是,正如您所看到的,标题没有很好地居中对齐,距离需要的位置有点偏高。
这是我的代码,希望有人能帮忙,非常感谢!
<p-carousel [value]='dateHistory' [numVisible]='1' [numScroll]='1' [circular]='true' (onPage)='pageChanged($event.page)'
[showIndicators]=false [page]='page'>
<ng-template let-date pTemplate='item'>
<div class='flex justify-content-center align-items-center my-2'> {{ date.month }} - {{ date.year }}</div>
</ng-template>
</p-carousel>
<div class='col-12 xl:col-3'>
<p-card header='Money Flow' styleClass='border-round-3xl' subheader='Your Monthly Income & Expenses data'>
<p-chart [data]='pieData' [options]='pieOptions' height='300px' type='doughnut'></p-chart>
</p-card>
</div>