rd-outer-component 0.0.90 → 0.0.91

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.
@@ -41,7 +41,10 @@ import { debounceTime, filter, switchMap } from 'rxjs/operators';
41
41
  class CustomCheckboxComponent {
42
42
  set options(val) {
43
43
  this._rawOptions = val ? [...val] : [];
44
- this.filteredOptions = val;
44
+ // 核心修复:深拷贝数组中的每一个对象
45
+ // 这样 nz-checkbox-group 修改 checked 属性时,只会修改这里的副本
46
+ // 永远不会影响到父组件 formFieldStruct 里的原始数据!
47
+ this.filteredOptions = val ? JSON.parse(JSON.stringify(val)) : [];
45
48
  }
46
49
  get options() {
47
50
  return this._rawOptions;