fantasy-ngzorro 1.3.27 → 1.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -928,7 +928,7 @@ var HdFilterComponent = /** @class */ (function () {
928
928
  function HdFilterComponent(fb) {
929
929
  this.fb = fb;
930
930
  this.searchEvent = new EventEmitter();
931
- this.resetEvent = null;
931
+ this.resetEvent = new EventEmitter();
932
932
  this.isShowMore = true;
933
933
  // 对filterList取模运算
934
934
  this.filterListModular = 0;
@@ -1069,10 +1069,12 @@ var HdFilterComponent = /** @class */ (function () {
1069
1069
  */
1070
1070
  function () {
1071
1071
  this.validateFilterForm.reset();
1072
- if (this.resetEvent) {
1072
+ if (this.resetEvent.observers.length > 0) {
1073
+ // 如果有父组件绑定了 resetEvent 的处理器
1073
1074
  this.resetEvent.emit(this.validateFilterForm.getRawValue());
1074
1075
  }
1075
1076
  else {
1077
+ // 如果没有绑定处理器,则触发 searchEvent
1076
1078
  this.searchEvent.emit(this.validateFilterForm.getRawValue());
1077
1079
  }
1078
1080
  };