@byteluck-fe/model-driven-engine 2.8.0-alpha.9 → 2.8.1-alpha.1
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);
|
|
@@ -1469,12 +1471,9 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1469
1471
|
// 如果能从flatInstances里边取到,就通过getInstanceInSubtableHeader方法取,取不到则换一种方式
|
|
1470
1472
|
if (instances.length) {
|
|
1471
1473
|
var instance = instances[0];
|
|
1472
|
-
|
|
1473
|
-
if (
|
|
1474
|
-
|
|
1475
|
-
if (headerInstance) {
|
|
1476
|
-
instances.unshift(headerInstance);
|
|
1477
|
-
}
|
|
1474
|
+
var headerInstance = this.getInstanceInSubtableHeader(instance);
|
|
1475
|
+
if (headerInstance) {
|
|
1476
|
+
instances.unshift(headerInstance);
|
|
1478
1477
|
}
|
|
1479
1478
|
} else {
|
|
1480
1479
|
var _this_getControlIdMapping;
|
|
@@ -1656,8 +1655,10 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1656
1655
|
return;
|
|
1657
1656
|
}
|
|
1658
1657
|
var rowIndex;
|
|
1659
|
-
// @ts-ignore
|
|
1660
|
-
|
|
1658
|
+
var isHeaders = // @ts-ignore
|
|
1659
|
+
this.assertInstance(instance.parent, CONTROL_TYPE.SUBTABLE_COLUMN) && // @ts-ignore
|
|
1660
|
+
this.assertInstance(instance.parent.parent, CONTROL_TYPE.SUBTABLE);
|
|
1661
|
+
if (isHeaders) {
|
|
1661
1662
|
rowIndex = -1;
|
|
1662
1663
|
} else {
|
|
1663
1664
|
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;
|
|
@@ -69,13 +69,13 @@ function _ts_generator(thisArg, body) {
|
|
|
69
69
|
trys: [],
|
|
70
70
|
ops: []
|
|
71
71
|
};
|
|
72
|
-
return
|
|
72
|
+
return g = {
|
|
73
73
|
next: verb(0),
|
|
74
74
|
"throw": verb(1),
|
|
75
75
|
"return": verb(2)
|
|
76
76
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
77
77
|
return this;
|
|
78
|
-
}), g
|
|
78
|
+
}), g;
|
|
79
79
|
function verb(n) {
|
|
80
80
|
return function(v) {
|
|
81
81
|
return step([
|
|
@@ -115,13 +115,13 @@ function _ts_generator(thisArg, body) {
|
|
|
115
115
|
trys: [],
|
|
116
116
|
ops: []
|
|
117
117
|
};
|
|
118
|
-
return
|
|
118
|
+
return g = {
|
|
119
119
|
next: verb(0),
|
|
120
120
|
"throw": verb(1),
|
|
121
121
|
"return": verb(2)
|
|
122
122
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
123
123
|
return this;
|
|
124
|
-
}), g
|
|
124
|
+
}), g;
|
|
125
125
|
function verb(n) {
|
|
126
126
|
return function(v) {
|
|
127
127
|
return step([
|