我有一个ng-select字段,我想在下拉列表中为所选字段设置复选标记,所以我想使用fontawesome check
,但我没有得到如何设置,可以任何人帮助我
HTML:
<ng-select class="box" placeholder="{{selected}}" [options]="company" [(ngModel)]="selected"></ng-select>
SCss:
.box {
select-dropdown .selected {
color: #82ffe4 !important;
background-color: #4389a9 !important;
font-size: 14px;
font-family: MontserratRegular;
}
}
TS:
this.company = [
{ label:"Wiredelta",value: "Wiredelta" },
{ label:"Timer", value: "Timer" },
{ label:"Artifu", value: "Artifu" },
{ label:"BoatButler", value: "BoatButler" },
];
this.selected="Wiredelta";
答案 0 :(得分:0)
通过像这样给出scss来解决这个问题
select-dropdown .selected:after {
font-family: FontAwesome;
content: "\f00c";
float: right;
margin-right: -6px;
}