@byteluck-fe/model-driven-engine 2.23.0-beta.19 → 2.23.0-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.
|
@@ -575,12 +575,18 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
575
575
|
var subtableData = this.getState(subtable.id);
|
|
576
576
|
this._handlerSubtableUpdateUid(subtableData);
|
|
577
577
|
this.runtime.getFlatInstances();
|
|
578
|
+
var rowIndexs = createdNewRows.map(function(item) {
|
|
579
|
+
var _item_children_, _item_children;
|
|
580
|
+
var subControl = item === null || item === void 0 ? void 0 : (_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.children[0];
|
|
581
|
+
return _this.getInstanceRowIndex(subControl);
|
|
582
|
+
});
|
|
578
583
|
this.emit('list-change', {
|
|
579
584
|
instance: subtable,
|
|
580
585
|
value: subtableData,
|
|
581
586
|
options: Object.assign({}, options, {
|
|
582
587
|
changed: createdNewRows,
|
|
583
588
|
data: createdNewRowsData,
|
|
589
|
+
rowIndexs: rowIndexs,
|
|
584
590
|
deleted: deleted !== null && deleted !== void 0 ? deleted : [],
|
|
585
591
|
jsonValue: JSON.stringify(subtableData),
|
|
586
592
|
isDeleteLastOne: isDeleteLastOne,
|
|
@@ -609,6 +615,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
609
615
|
{
|
|
610
616
|
key: "_handlerObjectUpdate",
|
|
611
617
|
value: function _handlerObjectUpdate(state, key, value, oldValue) {
|
|
618
|
+
var _this = this;
|
|
612
619
|
var instance = findItem(this.runtime.flatInstances, key, this.runtime.instanceMap);
|
|
613
620
|
if (!instance) {
|
|
614
621
|
return;
|
|
@@ -640,6 +647,11 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
640
647
|
this.runtime.getFlatInstances();
|
|
641
648
|
}
|
|
642
649
|
this._handlerSubtableUpdateUid(newValue);
|
|
650
|
+
var rowIndexs = newRows.map(function(item) {
|
|
651
|
+
var _item_children_, _item_children;
|
|
652
|
+
var subControl = item === null || item === void 0 ? void 0 : (_item_children = item.children) === null || _item_children === void 0 ? void 0 : (_item_children_ = _item_children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.children[0];
|
|
653
|
+
return _this.getInstanceRowIndex(subControl);
|
|
654
|
+
});
|
|
643
655
|
this.emit('list-change', {
|
|
644
656
|
instance: instance,
|
|
645
657
|
value: value,
|
|
@@ -647,6 +659,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
|
|
|
647
659
|
// @ts-ignore
|
|
648
660
|
changed: newRows,
|
|
649
661
|
data: newValue,
|
|
662
|
+
rowIndexs: rowIndexs,
|
|
650
663
|
deleted: deleted,
|
|
651
664
|
// deleted: oldValue ?? [],
|
|
652
665
|
type: 'push',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: zhaoxiaoyang zhaoxiaoyang@byteluck.com
|
|
3
3
|
* @Date: 2022-04-15 14:06:03
|
|
4
4
|
* @LastEditors: SuperLuckyqi
|
|
5
|
-
* @LastEditTime: 2024-11-08
|
|
5
|
+
* @LastEditTime: 2024-11-08 11:17:53
|
|
6
6
|
* @FilePath: /model-driven/packages/engine/src/plugins/StylePlugin.ts
|
|
7
7
|
*/ function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
@@ -61,9 +61,7 @@ export var StylePlugin = /*#__PURE__*/ function() {
|
|
|
61
61
|
dom === null || dom === void 0 ? void 0 : dom.appendChild(style);
|
|
62
62
|
var cssStyleText;
|
|
63
63
|
if (this.isPc) {
|
|
64
|
-
cssStyleText =
|
|
65
|
-
return ".render-engine-".concat(engine.id, " ").concat(match.trim());
|
|
66
|
-
});
|
|
64
|
+
cssStyleText = ".render-engine-".concat(engine.id, "{ ").concat(compiledStyle, " }");
|
|
67
65
|
} else {
|
|
68
66
|
cssStyleText = compiledStyle;
|
|
69
67
|
}
|