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.
- package/bundles/fantasy-ngzorro.umd.js +29 -1
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-filter/hd-filter.component.js +22 -2
- package/esm5/hd-filter/hd-filter.component.js +30 -2
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +21 -1
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +29 -1
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-filter/hd-filter.component.d.ts +4 -0
- package/package.json +1 -1
|
@@ -929,7 +929,8 @@ class HdFilterComponent {
|
|
|
929
929
|
* @return {?}
|
|
930
930
|
*/
|
|
931
931
|
resetForm() {
|
|
932
|
-
this.
|
|
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
|
*/
|