Button 启动-选择列表标题中的添加按钮
如何在picklist标题中添加自定义按钮,如? 我试图在Priming picklist头中添加按钮,但它只接受string作为头值。 有没有办法在自动生成的标题中添加任何模板HTMLButton 启动-选择列表标题中的添加按钮,button,primeng,picklist,Button,Primeng,Picklist,如何在picklist标题中添加自定义按钮,如? 我试图在Priming picklist头中添加按钮,但它只接受string作为头值。 有没有办法在自动生成的标题中添加任何模板HTML <p-pickList sourceHeader="Available" targetHeader="Selected> </p-pickList> 您可以扩展p-pickList并在扩展模板中添加按钮 import { Component, ElementRef, Input
<p-pickList
sourceHeader="Available" targetHeader="Selected>
</p-pickList>
您可以扩展p-pickList并在扩展模板中添加按钮
import { Component, ElementRef, Input, ViewEncapsulation } from '@angular/core';
import { PickList, DomHandler } from 'primeng/primeng';
import { ObjectUtils } from 'primeng/components/utils/objectutils';
@Component({
selector: 'ex-pick-list',
templateUrl: 'pick-list.component.html',
styleUrls: ['pick-list.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class PickListComponent extends PickList {
constructor(el: ElementRef, domHandler: DomHandler, objectUtils: ObjectUtils) {
super(el, domHandler, objectUtils);
}
}
<div class="pick-list-container">
<!-- put the original html from the primeng pick list component "moveRight()" now you can use moveRight from PickList -->
<div class="custom-buttons">
<button pButton type="button" (click)="moveRight()" class="ui-[label]="''"></button>
</div>
</div>
</div>
请更详细地回答你的问题。你想要实现什么,你尝试过什么,你面临着什么样的错误。如果您提供代码,请提供一些详细信息。享受Stackoverflow:-