【发布时间】:2018-10-22 08:00:24
【问题描述】:
我将 angular 与 primeng 和 Steps 组件一起使用。我正在尝试为禁用的步骤的元素赋予特定的样式。
在primeng文档中,我看到了这个属性badgeStyleClass,但对我不起作用,因为禁用元素的样式不适用:
这是我的代码:
this.otherItems = [
{
label: 'Personal',
command: (event: any) => { }
},
{
label: 'Seat',
disabled: true,
command: (event: any) => { }
},
{
label: 'Payment',
command: (event: any) => { }
},
{
label: 'Confirmation',
command: (event: any) => { }
},
{
label: 'Order Made',
disabled: true,
badgeStyleClass: '#43752b',
command: (event: any) => { }
}
];
<h3>Clickable only in an specific steps</h3>
<div class="steps">
<p-steps [model]="otherItems" [(activeIndex)]="actIndexClickableSpecificStep" [readonly]="false"></p-steps>
</div>
非常感谢
【问题讨论】: