imm-element-ui 2.5.3 → 2.5.5
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/esm2022/lib/form/form/form.component.mjs +3 -2
- package/esm2022/lib/page-form/page-form.component.mjs +30 -4
- package/fesm2022/imm-element-ui.mjs +31 -4
- package/fesm2022/imm-element-ui.mjs.map +1 -1
- package/lib/grid/grid/grid.component.d.ts +1 -1
- package/lib/steps/steps.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8451,7 +8451,8 @@ class FormComponent {
|
|
|
8451
8451
|
this.handleFieldControl(field);
|
|
8452
8452
|
});
|
|
8453
8453
|
this.applyDefaultValues();
|
|
8454
|
-
|
|
8454
|
+
let keys = Object.keys(this.model() || {});
|
|
8455
|
+
if (keys.length > 0) {
|
|
8455
8456
|
untracked(() => this.triggerHook());
|
|
8456
8457
|
}
|
|
8457
8458
|
}
|
|
@@ -10586,6 +10587,7 @@ class PageFormComponent extends AmComponent {
|
|
|
10586
10587
|
delRows(e) {
|
|
10587
10588
|
const gridTab = this.resolvedGridList()[this.indexValue];
|
|
10588
10589
|
const deleteFunc = gridTab.deleteFunc;
|
|
10590
|
+
console.log('delRows----', e, gridTab);
|
|
10589
10591
|
const subTable = gridTab.gridOptions.modelName;
|
|
10590
10592
|
const ids = Array.isArray(e) ? e : [e];
|
|
10591
10593
|
let prm = {
|
|
@@ -11188,10 +11190,35 @@ class PageFormComponent extends AmComponent {
|
|
|
11188
11190
|
ids = selectItem.filter((v) => v.id).map((v) => v.id);
|
|
11189
11191
|
}
|
|
11190
11192
|
if (ids.length > 0) {
|
|
11191
|
-
|
|
11193
|
+
const gridTab = this.resolvedGridList()[this.indexValue];
|
|
11194
|
+
const deleteFunc = gridTab.deleteFunc;
|
|
11195
|
+
let doneCalled = false;
|
|
11196
|
+
const done = () => {
|
|
11197
|
+
if (doneCalled) {
|
|
11198
|
+
return;
|
|
11199
|
+
}
|
|
11200
|
+
doneCalled = true;
|
|
11201
|
+
typeof this.formDetail() == 'function' ? this.formDetail()(this.id) : this.getDetail(4);
|
|
11192
11202
|
this.pageFormService.removeData(grid.subDataKey, this.pageFormService.getSelectedRows(), grid);
|
|
11193
|
-
this.
|
|
11194
|
-
}
|
|
11203
|
+
this.action.loading.set(false);
|
|
11204
|
+
};
|
|
11205
|
+
if (!deleteFunc) {
|
|
11206
|
+
this.action.loading.set(true);
|
|
11207
|
+
this.web_remove({ modelName: grid.gridOptions.modelName, ids }).subscribe((res) => {
|
|
11208
|
+
this.pageFormService.removeData(grid.subDataKey, this.pageFormService.getSelectedRows(), grid);
|
|
11209
|
+
this.pageFormService.setSelectedRows([]);
|
|
11210
|
+
});
|
|
11211
|
+
}
|
|
11212
|
+
else {
|
|
11213
|
+
this.action.loading.set(true);
|
|
11214
|
+
const result = deleteFunc(ids, gridTab, done);
|
|
11215
|
+
if (isObservable(result)) {
|
|
11216
|
+
result.subscribe(() => done());
|
|
11217
|
+
}
|
|
11218
|
+
else if (result && typeof result.subscribe === 'function') {
|
|
11219
|
+
result.subscribe(() => done());
|
|
11220
|
+
}
|
|
11221
|
+
}
|
|
11195
11222
|
}
|
|
11196
11223
|
else {
|
|
11197
11224
|
this.pageFormService.removeData(grid.subDataKey, this.pageFormService.getSelectedRows(), grid);
|