ng-zorro的nz-selected组件所有的事件的函数中$event事件对象都是undefined吗

新手上路,请多包涵

当我使用nz-selected组件时,在其中增加了一个nzBlur事件处理函数时,在函数中打印$event时为undefined

<nz-select 
    (nzBlur)="insertTruthValue(i, $event)"
    nzAllowClear
>
    <nz-option
        *ngFor="let item of data.disLeaval
        [nzLabel]="item"
        [nzValue]="item"
        [nzDisabled]="item.disabled"
    >
    </nz-option>
</nz-select>
阅读 3.9k
1 个回答
 if (!focusOrigin) {
  this.focused = false;
  this.cdr.markForCheck();
  this.nzBlur.emit();
  Promise.resolve().then(() => {
    this.onTouched();
  });
} else {
  this.focused = true;
  this.cdr.markForCheck();
  this.nzFocus.emit();
}

代码如上,
this.nzBlur.emit();没有传任何参数

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进