@byteluck-fe/model-driven-engine 6.2.0-beta.10 → 6.2.0-beta.17
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/dist/esm/common/Engine.js +18 -2
- package/dist/index.umd.js +14 -14
- package/dist/types/common/Engine.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1291,12 +1291,22 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1291
1291
|
var skipKey = [] //qiyu ObjectDataBind中会提前将相关key拿出来赋值,为了避免重复赋值,设置了此变量
|
|
1292
1292
|
;
|
|
1293
1293
|
Object.keys(row).map(function(fieldCode) {
|
|
1294
|
+
var _this_store_dataBindMapping_dataCode_fields, _this_store_dataBindMapping_dataCode;
|
|
1295
|
+
var existField = (_this_store_dataBindMapping_dataCode = _this.store.dataBindMapping[dataCode]) === null || _this_store_dataBindMapping_dataCode === void 0 ? void 0 : (_this_store_dataBindMapping_dataCode_fields = _this_store_dataBindMapping_dataCode.fields) === null || _this_store_dataBindMapping_dataCode_fields === void 0 ? void 0 : _this_store_dataBindMapping_dataCode_fields.some(function(i) {
|
|
1296
|
+
return i.fieldCode === fieldCode;
|
|
1297
|
+
});
|
|
1298
|
+
//未绑定字段的控件处理
|
|
1299
|
+
if (!existField) {
|
|
1300
|
+
if (fieldCode in newRow && row[fieldCode] !== undefined) {
|
|
1301
|
+
newRow[fieldCode] = row[fieldCode];
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1294
1304
|
if (skipKey.includes(fieldCode)) {
|
|
1295
1305
|
return;
|
|
1296
1306
|
}
|
|
1297
1307
|
if (cacheFieldMapping.hasOwnProperty(fieldCode) === false) {
|
|
1298
|
-
var
|
|
1299
|
-
cacheFieldMapping[fieldCode] = (
|
|
1308
|
+
var _this_store_dataBindMapping_dataCode_fields1, _this_store_dataBindMapping_dataCode1;
|
|
1309
|
+
cacheFieldMapping[fieldCode] = (_this_store_dataBindMapping_dataCode1 = _this.store.dataBindMapping[dataCode]) === null || _this_store_dataBindMapping_dataCode1 === void 0 ? void 0 : (_this_store_dataBindMapping_dataCode_fields1 = _this_store_dataBindMapping_dataCode1.fields) === null || _this_store_dataBindMapping_dataCode_fields1 === void 0 ? void 0 : _this_store_dataBindMapping_dataCode_fields1.find(function(i) {
|
|
1300
1310
|
return i.fieldCode === fieldCode;
|
|
1301
1311
|
});
|
|
1302
1312
|
}
|
|
@@ -1366,6 +1376,12 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1366
1376
|
});
|
|
1367
1377
|
newState[mapping.dataViewId[0]][mapping.controlId] = objValue;
|
|
1368
1378
|
}
|
|
1379
|
+
} else {
|
|
1380
|
+
/* 若存在dataView内 则认为是没绑定字段的默认值*/ var isInDataView = fieldCode in emptyState;
|
|
1381
|
+
var mapping1 = _this.getDataBindMapping(dataCode);
|
|
1382
|
+
if (isInDataView && (mapping1 === null || mapping1 === void 0 ? void 0 : mapping1.dataViewId) && entity[dataCode] !== undefined) {
|
|
1383
|
+
newState[mapping1 === null || mapping1 === void 0 ? void 0 : mapping1.dataViewId][fieldCode] = entity[fieldCode];
|
|
1384
|
+
}
|
|
1369
1385
|
}
|
|
1370
1386
|
});
|
|
1371
1387
|
}
|