@byteluck-fe/model-driven-engine 2.7.0-alpha.13 → 2.7.0-alpha.15

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.
@@ -537,6 +537,7 @@ var Engine = /*#__PURE__*/ function(Watcher) {
537
537
  var createdNewRows = [];
538
538
  var createdNewRowsData = [];
539
539
  var deleted = [];
540
+ var isDeleteLastOne = false;
540
541
  if (type && args) {
541
542
  // const subtableOldLength = subtable.children.length
542
543
  switch(type){
@@ -573,6 +574,13 @@ var Engine = /*#__PURE__*/ function(Watcher) {
573
574
  } else {
574
575
  var // @ts-ignore
575
576
  _subtable_children2;
577
+ // 从哪儿开始
578
+ var start1 = args[0];
579
+ // 替换几个
580
+ var replace1 = args[1];
581
+ if (start1 + replace1 === subtable.children.length - 1) {
582
+ isDeleteLastOne = true;
583
+ }
576
584
  (_subtable_children2 = subtable.children)[type].apply(_subtable_children2, _toConsumableArray(args));
577
585
  this.runtime.getFlatInstances();
578
586
  }
@@ -601,7 +609,8 @@ var Engine = /*#__PURE__*/ function(Watcher) {
601
609
  changed: createdNewRows,
602
610
  data: createdNewRowsData,
603
611
  deleted: deleted !== null && deleted !== void 0 ? deleted : [],
604
- jsonValue: JSON.stringify(this.getState(subtable.id))
612
+ jsonValue: JSON.stringify(this.getState(subtable.id)),
613
+ isDeleteLastOne: isDeleteLastOne
605
614
  })
606
615
  });
607
616
  // 主动清空本次任务中的options