@byteluck-fe/model-driven-engine 2.8.0-alpha.1b → 2.8.0-alpha.1e
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.
|
@@ -648,6 +648,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
648
648
|
// for (let i = 0; i < newValue.length; i++) {
|
|
649
649
|
// this.setStates(newValue[i], i, options)
|
|
650
650
|
// }
|
|
651
|
+
var deleted = oldValue !== null && oldValue !== void 0 ? oldValue : [];
|
|
652
|
+
if ((eventOptionsTemp === null || eventOptionsTemp === void 0 ? void 0 : eventOptionsTemp.listChange) === "noDelete") {
|
|
653
|
+
deleted = [];
|
|
654
|
+
}
|
|
651
655
|
this.emit("list-change", {
|
|
652
656
|
instance: instance,
|
|
653
657
|
value: value,
|
|
@@ -655,7 +659,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
655
659
|
// @ts-ignore
|
|
656
660
|
changed: newRows,
|
|
657
661
|
data: newValue,
|
|
658
|
-
deleted:
|
|
662
|
+
deleted: deleted,
|
|
663
|
+
// deleted: oldValue ?? [],
|
|
659
664
|
type: "push"
|
|
660
665
|
})
|
|
661
666
|
});
|
|
@@ -1286,6 +1291,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1286
1291
|
});
|
|
1287
1292
|
newRow[fieldMapping.controlId] = objValue;
|
|
1288
1293
|
}
|
|
1294
|
+
} else if (fieldCode === "uid" && row["uid"] !== undefined) {
|
|
1295
|
+
newRow["uid"] = row["uid"];
|
|
1289
1296
|
}
|
|
1290
1297
|
});
|
|
1291
1298
|
newState[mapping.dataViewId][mapping.controlId].push(newRow);
|
|
@@ -1349,7 +1356,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1349
1356
|
}
|
|
1350
1357
|
});
|
|
1351
1358
|
this.debugLog("engine setData方法数据组合完成,参数为%o。", newState);
|
|
1352
|
-
this.setStates(newState, undefined,
|
|
1359
|
+
this.setStates(newState, undefined, _object_spread({
|
|
1360
|
+
listChange: "noDelete"
|
|
1361
|
+
}, options));
|
|
1353
1362
|
this.debugLog("engine setData方法执行完成。");
|
|
1354
1363
|
}
|
|
1355
1364
|
},
|
|
@@ -196,7 +196,9 @@ export var CalcPlugin = /*#__PURE__*/ function() {
|
|
|
196
196
|
* */ function allCalcControlComputed() {
|
|
197
197
|
var _this = this;
|
|
198
198
|
this.calcControls.forEach(function(item) {
|
|
199
|
+
// this.engine.getState(item.id)
|
|
199
200
|
if (item.props.dataBind.result.fieldCode === null || item.props.dataBind.result.fieldCode === undefined) {
|
|
201
|
+
// formEngineModel在custom:beforeEngineMounted时调用二开赋值,表单值 set 了却没有做计算。但这个是正常的
|
|
200
202
|
_this.computedCalcValue(item);
|
|
201
203
|
}
|
|
202
204
|
});
|