fantasy-ngzorro 1.3.46 → 1.3.47

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.
@@ -929,7 +929,8 @@ class HdFilterComponent {
929
929
  * @return {?}
930
930
  */
931
931
  resetForm() {
932
- this.validateFilterForm.reset();
932
+ this.resetFilterFormWithValue();
933
+ // this.validateFilterForm.reset();
933
934
  if (this.resetEvent.observers.length > 0) {
934
935
  // 如果有父组件绑定了 resetEvent 的处理器
935
936
  this.resetEvent.emit(this.validateFilterForm.getRawValue());
@@ -939,6 +940,25 @@ class HdFilterComponent {
939
940
  this.searchEvent.emit(this.validateFilterForm.getRawValue());
940
941
  }
941
942
  }
943
+ /**
944
+ * 带初始值重置表单
945
+ * @return {?}
946
+ */
947
+ resetFilterFormWithValue() {
948
+ /** @type {?} */
949
+ let formGroupList = {};
950
+ this.filterList.forEach((/**
951
+ * @param {?} item
952
+ * @param {?} index
953
+ * @return {?}
954
+ */
955
+ (item, index) => {
956
+ formGroupList[item.name] = this.fb.control(item.value, []);
957
+ // 初始化控件显影
958
+ item.show = index < 7;
959
+ }));
960
+ this.validateFilterForm = this.fb.group(formGroupList);
961
+ }
942
962
  /**
943
963
  * @return {?}
944
964
  */