fantasy-ngzorro 2.2.10 → 2.2.11

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/README.md CHANGED
@@ -32,6 +32,7 @@
32
32
 
33
33
  | 更新人 | 更新时间 | 更新内容 |
34
34
  | ------ | -------- | -------- |
35
+ | — | 2026-10-3 | `hd-filter`:筛选组进页只请求一次(跳过 ngOnChanges firstChange,避免与 ngOnInit 重复导致首次请求被取消)(2.2.11) |
35
36
  | — | 2026-10-3 | `hd-status`:补充对账/登记/付款状态色(未对账、对账中、已对账、未登记、已登记、未付款、可付款、可对账)(2.2.10) |
36
37
  | MC | 2023-2-10 | Readme 创建;按钮、按钮组、通用表格、筛选器、状态、详情头、详情单头、详情明细文档 |
37
38
  | MC | 2023-2-13 | 表单、明细表单、间隔、小标题文档;组件字段增加必填说明 |
@@ -4057,6 +4057,7 @@
4057
4057
  */
4058
4058
  function () {
4059
4059
  this.init();
4060
+ // 首次加载只在这里请求一次;ngOnChanges 首次也会带上 enableFilterScheme/filterSchemeKey,避免重复调接口
4060
4061
  this.tryLoadSchemes(true);
4061
4062
  };
4062
4063
  /**
@@ -4072,7 +4073,14 @@
4072
4073
  this.init();
4073
4074
  }
4074
4075
  if (changes['enableFilterScheme'] || changes['filterSchemeKey']) {
4075
- this.tryLoadSchemes(true);
4076
+ // 首次变更与 ngOnInit 重复(第二次会 unsubscribe 第一次,表现为请求无返回);仅后续切换再加载
4077
+ /** @type {?} */
4078
+ var enableLater = changes['enableFilterScheme'] && !changes['enableFilterScheme'].firstChange;
4079
+ /** @type {?} */
4080
+ var keyLater = changes['filterSchemeKey'] && !changes['filterSchemeKey'].firstChange;
4081
+ if (enableLater || keyLater) {
4082
+ this.tryLoadSchemes(true);
4083
+ }
4076
4084
  }
4077
4085
  };
4078
4086
  /**