<div class="nb-select-options"><div *ngIf="searchable" class="nb-select-search"><input nbInput type="text" placeholder="请输入文字" (click)="$event.stopPropagation();" (input)="onSearch($event)"> <i class="icon iconfont icon-search" (click)="$event.stopPropagation();"></i></div><div class="nb-select-option" *ngFor="let item of data;"><div class="nb-select-option-lable" [ngClass]="{'active': (!item.children && item.value === value),'leaf': !item.children}" (click)="onSelectOption($event, item)" [attr.value]="item.value"><ng-container *ngIf="optionTpl"><ng-container *ngTemplateOutlet="optionTpl;context: {$implicit: item}"></ng-container></ng-container><ng-container *ngIf="!optionTpl">{{ item.label }}</ng-container></div><ng-container *ngIf="item.children"><div *ngFor="let child of item.children" class="nb-select-option-lable sub-option" [ngClass]="{'active': child.value === value, 'leaf': item.children}" (click)="onSelectOption($event, child)" [attr.value]="child.value"><ng-container *ngIf="optionTpl"><ng-container *ngTemplateOutlet="optionTpl;context: {$implicit: child}"></ng-container></ng-container><ng-container *ngIf="!optionTpl">{{ child.label }}</ng-container></div></ng-container></div></div>