@byteluck-fe/model-driven-engine 2.3.1-beta.19 → 2.3.1-beta.20
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 +20 -28
- package/dist/index.umd.js +8 -8
- package/package.json +2 -2
|
@@ -1113,35 +1113,27 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1113
1113
|
newState[mapping.dataViewId[0]][mapping.controlId] = objValue;
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
var mainStateKeys = Object.keys((_newState_mapping_controlId = newState === null || newState === void 0 ? void 0 : newState[mapping.controlId]) !== null && _newState_mapping_controlId !== void 0 ? _newState_mapping_controlId : {});
|
|
1136
|
-
if (!mainStateKeys.length) {
|
|
1137
|
-
return;
|
|
1116
|
+
var newMapping = _this.getDataBindMapping(dataCode);
|
|
1117
|
+
if (newMapping) {
|
|
1118
|
+
var _newMapping_fields;
|
|
1119
|
+
var mappingKeys = newMapping === null || newMapping === void 0 ? void 0 : (_newMapping_fields = newMapping.fields) === null || _newMapping_fields === void 0 ? void 0 : _newMapping_fields.map(function(item) {
|
|
1120
|
+
return item === null || item === void 0 ? void 0 : item.controlId;
|
|
1121
|
+
});
|
|
1122
|
+
var mappingValue = _this.getEmptyState(newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId);
|
|
1123
|
+
var mainStateKeys = Object.keys(newState);
|
|
1124
|
+
mappingKeys.forEach(function(key) {
|
|
1125
|
+
if (!mainStateKeys.includes(key) && key !== "uid") {
|
|
1126
|
+
if (Object.keys(newState).length) {
|
|
1127
|
+
Object.assign(newState[newMapping === null || newMapping === void 0 ? void 0 : newMapping.controlId], _defineProperty({}, key, [
|
|
1128
|
+
mappingValue[key]
|
|
1129
|
+
]));
|
|
1130
|
+
} else {
|
|
1131
|
+
Object.assign(newState, _defineProperty({}, newMapping.controlId, _defineProperty({}, key, mappingValue[key])));
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1138
1135
|
}
|
|
1139
|
-
|
|
1140
|
-
if (!mainStateKeys.includes(key) && key !== "uid") {
|
|
1141
|
-
Object.assign(newState[mapping.controlId], mappingValue[key]);
|
|
1142
|
-
}
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1136
|
+
});
|
|
1145
1137
|
}
|
|
1146
1138
|
});
|
|
1147
1139
|
this.debugLog("engine setData方法数据组合完成,参数为%o。", newState);
|