imm-element-ui 1.9.1 → 1.9.2

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.
@@ -4534,6 +4534,48 @@ const pageListGridOptions = (gridOptions, thisArg) => {
4534
4534
  convertCol(gridOptions, gridOptions.columnDefs, 1);
4535
4535
  return gridOptions;
4536
4536
  };
4537
+ // 深度拷贝
4538
+ const deepClone = (source, that, cache) => {
4539
+ if (!cache) {
4540
+ cache = new Map();
4541
+ }
4542
+ if (source instanceof Object) { // 不考虑跨 iframe
4543
+ if (cache.get(source)) {
4544
+ return cache.get(source);
4545
+ }
4546
+ let result;
4547
+ if (source instanceof Function) {
4548
+ if (source.prototype) { // 有 prototype 就是普通函数
4549
+ result = function () { return source.apply(that, arguments); };
4550
+ }
4551
+ else {
4552
+ result = (...args) => { return source.call(undefined, ...args); };
4553
+ }
4554
+ }
4555
+ else if (source instanceof Array) {
4556
+ result = [];
4557
+ }
4558
+ else if (source instanceof Date) {
4559
+ result = new Date(source - 0);
4560
+ }
4561
+ else if (source instanceof RegExp) {
4562
+ result = new RegExp(source.source, source.flags);
4563
+ }
4564
+ else {
4565
+ result = {};
4566
+ }
4567
+ cache.set(source, result);
4568
+ for (let key in source) {
4569
+ if (source.hasOwnProperty(key)) {
4570
+ result[key] = deepClone(source[key], cache);
4571
+ }
4572
+ }
4573
+ return result;
4574
+ }
4575
+ else {
4576
+ return source;
4577
+ }
4578
+ };
4537
4579
 
4538
4580
  const _gridUtils = {
4539
4581
  calcRowIds: (api, isServerSide) => {
@@ -9137,11 +9179,8 @@ class PageFormComponent extends AmComponent {
9137
9179
  this.dialogSearchPrm = {};
9138
9180
  this.selectOptions = this.gridList()[this.indexValue]['selectOptions'];
9139
9181
  if (this.selectOptions?.searchPrm) {
9140
- let searchPrm = JSON.parse(JSON.stringify(this.selectOptions?.searchPrm));
9141
- console.log('searchPrm-----', searchPrm, this.selectOptions?.searchPrm);
9142
- console.log('this.selectOptions', this.selectOptions);
9143
- console.log('model-----', this.cForm.model());
9144
- searchPrm?.columnFilters?.forEach((v) => {
9182
+ let searchPrm = deepClone(this.selectOptions.searchPrm, this);
9183
+ searchPrm.columnFilters?.forEach((v) => {
9145
9184
  if (typeof v.fiter == 'function') {
9146
9185
  v.fiter = v.fiter(null, this.getPrm.data || this.cForm.model());
9147
9186
  }
@@ -9598,5 +9637,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9598
9637
  * Generated bundle index. Do not edit.
9599
9638
  */
9600
9639
 
9601
- export { ActionService, ActionsComponent, AmComponent, AsyncRenderer, CellEditAutoCompleteComponent, CellEditDatePickerComponent, CellEditInputDateComponent, CellEditInputNumberCompoent, CellEditInputTextCompoent, CellEditSelectComponent, CodeMirrorComponent, CrumbActionComponent, FieldControl, FormComponent, FormFieldComponent, FormTypeComponent, GridComponent, HeadComponent, HrefBtnListComponent, I18N_Token, I18nService, ImportComponent, LANGS, LinkRenderer, LoadingComponent, LoadingService, LogComponent, PageActionService, PageFormComponent, PageGridListComponent, PagerComponent, PopActionService, RowSelectorComponent$1 as RowSelectorComponent, SearchComponent, StepsComponent, ThemeConfigComponent, ThemeConfigService, UserHistoryService, calcRowSpan, changeContent, clearLocal, compileTsToJs, convertAct, convertCol, convertForm, convertGrid, createCircularIterator, filterObjectByKeys, formTypeToProps, generateUniqueId, gridOptionsHooker, gridUtils, isJSONParsable, pageListGridOptions, parseFunctions, toPascalCase };
9640
+ export { ActionService, ActionsComponent, AmComponent, AsyncRenderer, CellEditAutoCompleteComponent, CellEditDatePickerComponent, CellEditInputDateComponent, CellEditInputNumberCompoent, CellEditInputTextCompoent, CellEditSelectComponent, CodeMirrorComponent, CrumbActionComponent, FieldControl, FormComponent, FormFieldComponent, FormTypeComponent, GridComponent, HeadComponent, HrefBtnListComponent, I18N_Token, I18nService, ImportComponent, LANGS, LinkRenderer, LoadingComponent, LoadingService, LogComponent, PageActionService, PageFormComponent, PageGridListComponent, PagerComponent, PopActionService, RowSelectorComponent$1 as RowSelectorComponent, SearchComponent, StepsComponent, ThemeConfigComponent, ThemeConfigService, UserHistoryService, calcRowSpan, changeContent, clearLocal, compileTsToJs, convertAct, convertCol, convertForm, convertGrid, createCircularIterator, deepClone, filterObjectByKeys, formTypeToProps, generateUniqueId, gridOptionsHooker, gridUtils, isJSONParsable, pageListGridOptions, parseFunctions, toPascalCase };
9602
9641
  //# sourceMappingURL=imm-element-ui.mjs.map