rb-document-form-constructor 0.10.2 → 0.10.3

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.
@@ -33506,12 +33506,14 @@ var script$1 = {
33506
33506
  this.ruleModalCfg = {
33507
33507
  mode: 'ins',
33508
33508
  rule: {
33509
+ id: UtRandom.getRandomString(10),
33509
33510
  name: null,
33510
33511
  script: null
33511
33512
  },
33512
33513
  onAfterOk: rule => {
33513
33514
  this.field.rules = this.field.rules ? this.field.rules : [];
33514
- this.field.rules.push({ ...rule
33515
+ this.field.rules.push({ ...rule,
33516
+ id: rule.id || UtRandom.getRandomString(10)
33515
33517
  });
33516
33518
  this.rulesHash = UtRandom.getRandomString(10);
33517
33519
  }
@@ -33536,7 +33538,7 @@ var script$1 = {
33536
33538
  },
33537
33539
 
33538
33540
  removeRule(rule) {
33539
- let index = this.field.rules.findIndex(r => r.id === rule.id);
33541
+ const index = this.field.rules.indexOf(rule);
33540
33542
 
33541
33543
  if (index >= 0) {
33542
33544
  this.field.rules.splice(index, 1);
@@ -33817,6 +33819,7 @@ var __vue_render__$1 = function () {
33817
33819
  },
33818
33820
  on: {
33819
33821
  "click": function ($event) {
33822
+ $event.stopPropagation();
33820
33823
  return _vm.removeRule(rule);
33821
33824
  }
33822
33825
  }