@byteluck-fe/model-driven-engine 2.2.3 → 2.2.6-beta.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.
- package/dist/esm/common/Engine.js +33 -15
- package/dist/index.umd.js +7 -7
- package/package.json +4 -4
|
@@ -1182,24 +1182,42 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
1182
1182
|
return instances;
|
|
1183
1183
|
};
|
|
1184
1184
|
_proto.setInstance = function setInstance(instance, props, value, rowIndex) {
|
|
1185
|
+
var _this = this;
|
|
1185
1186
|
try {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1187
|
+
if (typeof instance === "string" && rowIndex === -1) {
|
|
1188
|
+
//修改明细表整列属性的逻辑
|
|
1189
|
+
var instances = this.getInstances(instance, rowIndex === -1);
|
|
1190
|
+
instances.map(function(_instance) {
|
|
1191
|
+
if (_instance) {
|
|
1192
|
+
_this.debugLog("[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
|
|
1193
|
+
updateValueFromKeys(_instance.props, props, value);
|
|
1194
|
+
_this.schemaEvent("schema-change", {
|
|
1195
|
+
instance: _instance,
|
|
1196
|
+
props: props,
|
|
1197
|
+
value: value,
|
|
1198
|
+
rowIndex: rowIndex
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1189
1202
|
} else {
|
|
1190
|
-
_instance
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1203
|
+
var _instance;
|
|
1204
|
+
if (typeof instance === "string") {
|
|
1205
|
+
_instance = this.getInstance(instance, rowIndex);
|
|
1206
|
+
} else {
|
|
1207
|
+
_instance = instance;
|
|
1208
|
+
}
|
|
1209
|
+
if (!_instance) {
|
|
1210
|
+
return;
|
|
1211
|
+
}
|
|
1212
|
+
this.debugLog("[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
|
|
1213
|
+
updateValueFromKeys(_instance.props, props, value);
|
|
1214
|
+
this.schemaEvent("schema-change", {
|
|
1215
|
+
instance: _instance,
|
|
1216
|
+
props: props,
|
|
1217
|
+
value: value,
|
|
1218
|
+
rowIndex: rowIndex
|
|
1219
|
+
});
|
|
1194
1220
|
}
|
|
1195
|
-
this.debugLog("[%o]: 修改instance: %o的%o属性,修改的值为%o。", _instance.id, _instance, props, value);
|
|
1196
|
-
updateValueFromKeys(_instance.props, props, value);
|
|
1197
|
-
this.schemaEvent("schema-change", {
|
|
1198
|
-
instance: _instance,
|
|
1199
|
-
props: props,
|
|
1200
|
-
value: value,
|
|
1201
|
-
rowIndex: rowIndex
|
|
1202
|
-
});
|
|
1203
1221
|
} catch (e) {
|
|
1204
1222
|
throw e;
|
|
1205
1223
|
}
|