@yibozhang/pro-table 16.0.7 → 16.0.9

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.
@@ -897,17 +897,18 @@ class ProTableComponent {
897
897
  });
898
898
  seen.add(field);
899
899
  });
900
- // 2) 新增字段(远程不存在)追加到末尾,默认显示用 initColumns 的 isShow
900
+ // 2) 追加前端新增但远程未存储的字段,使用前端默认配置(默认显示/默认标题等)
901
901
  initColumns.forEach((ic) => {
902
- if (seen.has(ic.field))
902
+ const field = ic?.field;
903
+ if (!field || seen.has(field))
903
904
  return;
904
905
  merged.push({
905
- field: ic.field,
906
+ field,
906
907
  isShow: ic.isShow,
907
908
  header: ic.header,
908
909
  sortName: ic.sortName ?? null,
909
910
  });
910
- seen.add(ic.field);
911
+ seen.add(field);
911
912
  });
912
913
  return merged;
913
914
  }