@byteluck-fe/model-driven-engine 2.8.0-alpha.1c → 2.8.0-alpha.1f

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.
@@ -1237,7 +1237,11 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1237
1237
  value: function setData(dataSet, options) {
1238
1238
  var _this = this;
1239
1239
  this.debugLog("engine setData方法执行,参数为%o,%o。", dataSet, options);
1240
+ var onlySetData = options === null || options === void 0 ? void 0 : options.onlySetData;
1240
1241
  var newState = this.store.defaultState;
1242
+ if (onlySetData === true) {
1243
+ newState = {};
1244
+ }
1241
1245
  Object.keys(dataSet).map(function(dataCode) {
1242
1246
  var entity = dataSet[dataCode];
1243
1247
  if (Array.isArray(entity)) {
@@ -1291,6 +1295,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1291
1295
  });
1292
1296
  newRow[fieldMapping.controlId] = objValue;
1293
1297
  }
1298
+ } else if (fieldCode === "uid" && row["uid"] !== undefined) {
1299
+ newRow["uid"] = row["uid"];
1294
1300
  }
1295
1301
  });
1296
1302
  newState[mapping.dataViewId][mapping.controlId].push(newRow);
@@ -1354,7 +1360,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
1354
1360
  }
1355
1361
  });
1356
1362
  this.debugLog("engine setData方法数据组合完成,参数为%o。", newState);
1357
- this.setStates(newState, undefined, options);
1363
+ this.setStates(newState, undefined, _object_spread({
1364
+ listChange: "noDelete"
1365
+ }, options));
1358
1366
  this.debugLog("engine setData方法执行完成。");
1359
1367
  }
1360
1368
  },
@@ -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
  });