@byteluck-fe/model-driven-engine 2.8.0-alpha.9 → 2.8.1-alpha.0
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.
|
@@ -1285,7 +1285,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1285
1285
|
var _this_getEmptyState;
|
|
1286
1286
|
cacheEmptyState[fieldMapping.controlId] = JSONCopy((_this_getEmptyState = _this.getEmptyState(fieldMapping.controlId)) !== null && _this_getEmptyState !== void 0 ? _this_getEmptyState : {});
|
|
1287
1287
|
}
|
|
1288
|
-
var objValue = cacheEmptyState[fieldMapping.controlId];
|
|
1288
|
+
var objValue = JSONCopy(cacheEmptyState[fieldMapping.controlId]);
|
|
1289
1289
|
Object.keys(fieldMapping.dataBind).map(function(key) {
|
|
1290
1290
|
var dataBind = fieldMapping.dataBind[key];
|
|
1291
1291
|
if (row[dataBind.fieldCode] !== undefined) {
|
|
@@ -1295,8 +1295,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1295
1295
|
});
|
|
1296
1296
|
newRow[fieldMapping.controlId] = objValue;
|
|
1297
1297
|
}
|
|
1298
|
-
} else if (fieldCode === "uid" && row
|
|
1299
|
-
newRow
|
|
1298
|
+
} else if (fieldCode === "uid" && row.uid !== undefined) {
|
|
1299
|
+
newRow.uid = row.uid;
|
|
1300
|
+
} else if (fieldCode === "virtualStore" && row.virtualStore !== undefined) {
|
|
1301
|
+
newRow.virtualStore = Object.freeze(row.virtualStore);
|
|
1300
1302
|
}
|
|
1301
1303
|
});
|
|
1302
1304
|
newState[mapping.dataViewId][mapping.controlId].push(newRow);
|
|
@@ -1656,8 +1658,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1656
1658
|
return;
|
|
1657
1659
|
}
|
|
1658
1660
|
var rowIndex;
|
|
1659
|
-
// @ts-ignore
|
|
1660
|
-
|
|
1661
|
+
var isHeaders = // @ts-ignore
|
|
1662
|
+
this.assertInstance(instance.parent, CONTROL_TYPE.SUBTABLE_COLUMN) && // @ts-ignore
|
|
1663
|
+
this.assertInstance(instance.parent.parent, CONTROL_TYPE.SUBTABLE);
|
|
1664
|
+
if (isHeaders) {
|
|
1661
1665
|
rowIndex = -1;
|
|
1662
1666
|
} else {
|
|
1663
1667
|
var isColumnChild = this.getInstanceParentControl(instance, // @ts-ignore
|
package/dist/esm/common/Store.js
CHANGED
|
@@ -122,7 +122,9 @@ var Store = /*#__PURE__*/ function() {
|
|
|
122
122
|
var controlInfo = this.controlIdMapping[controlId];
|
|
123
123
|
if (controlInfo !== undefined) {
|
|
124
124
|
var data = this.state[controlInfo.dataView][controlId];
|
|
125
|
-
|
|
125
|
+
var _controlInfo_children;
|
|
126
|
+
// 只有明细表key,再通过rowIndex获取行数据
|
|
127
|
+
if (rowIndex !== undefined && Object.keys((_controlInfo_children = controlInfo === null || controlInfo === void 0 ? void 0 : controlInfo.children) !== null && _controlInfo_children !== void 0 ? _controlInfo_children : {}).length > 0) {
|
|
126
128
|
return data[rowIndex];
|
|
127
129
|
} else {
|
|
128
130
|
return data;
|