rb-document-form-constructor 0.10.1 → 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.
|
@@ -33442,14 +33442,13 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
|
|
|
33442
33442
|
},
|
|
33443
33443
|
currentInputName: function currentInputName(val) {
|
|
33444
33444
|
this.field.input = UtFormConstructor.getInputTypeByName(this.currentInputName, this.field);
|
|
33445
|
-
}
|
|
33446
|
-
|
|
33447
|
-
|
|
33445
|
+
} // multiple() {
|
|
33446
|
+
// let input = UtFormConstructor.getDefaultInput(this.field);
|
|
33447
|
+
// if (this.field.multiple) {
|
|
33448
|
+
// this.currentInputName = input.name;
|
|
33449
|
+
// }
|
|
33450
|
+
// },
|
|
33448
33451
|
|
|
33449
|
-
if (this.field.multiple) {
|
|
33450
|
-
this.currentInputName = input.name;
|
|
33451
|
-
}
|
|
33452
|
-
}
|
|
33453
33452
|
},
|
|
33454
33453
|
methods: {
|
|
33455
33454
|
hide: function hide() {
|
|
@@ -33492,13 +33491,16 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
|
|
|
33492
33491
|
this.ruleModalCfg = {
|
|
33493
33492
|
mode: 'ins',
|
|
33494
33493
|
rule: {
|
|
33494
|
+
id: UtRandom.getRandomString(10),
|
|
33495
33495
|
name: null,
|
|
33496
33496
|
script: null
|
|
33497
33497
|
},
|
|
33498
33498
|
onAfterOk: function onAfterOk(rule) {
|
|
33499
33499
|
_this.field.rules = _this.field.rules ? _this.field.rules : [];
|
|
33500
33500
|
|
|
33501
|
-
_this.field.rules.push(_objectSpread2({}, rule)
|
|
33501
|
+
_this.field.rules.push(_objectSpread2(_objectSpread2({}, rule), {}, {
|
|
33502
|
+
id: rule.id || UtRandom.getRandomString(10)
|
|
33503
|
+
}));
|
|
33502
33504
|
|
|
33503
33505
|
_this.rulesHash = UtRandom.getRandomString(10);
|
|
33504
33506
|
}
|
|
@@ -33520,9 +33522,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
|
|
|
33520
33522
|
this.$bvModal.show(this.modalId);
|
|
33521
33523
|
},
|
|
33522
33524
|
removeRule: function removeRule(rule) {
|
|
33523
|
-
var index = this.field.rules.
|
|
33524
|
-
return r.id === rule.id;
|
|
33525
|
-
});
|
|
33525
|
+
var index = this.field.rules.indexOf(rule);
|
|
33526
33526
|
|
|
33527
33527
|
if (index >= 0) {
|
|
33528
33528
|
this.field.rules.splice(index, 1);
|
|
@@ -33798,6 +33798,7 @@ var __vue_render__$1 = function __vue_render__() {
|
|
|
33798
33798
|
},
|
|
33799
33799
|
on: {
|
|
33800
33800
|
"click": function click($event) {
|
|
33801
|
+
$event.stopPropagation();
|
|
33801
33802
|
return _vm.removeRule(rule);
|
|
33802
33803
|
}
|
|
33803
33804
|
}
|
|
@@ -33831,7 +33832,7 @@ var __vue_inject_styles__$1 = undefined;
|
|
|
33831
33832
|
var __vue_scope_id__$1 = undefined;
|
|
33832
33833
|
/* module identifier */
|
|
33833
33834
|
|
|
33834
|
-
var __vue_module_identifier__$1 = "data-v-
|
|
33835
|
+
var __vue_module_identifier__$1 = "data-v-d4533084";
|
|
33835
33836
|
/* functional template */
|
|
33836
33837
|
|
|
33837
33838
|
var __vue_is_functional_template__$1 = false;
|
package/package.json
CHANGED
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
:data-hash="rulesHash"
|
|
128
128
|
class="cursor-pointer d-flex justify-content-between align-items-center">
|
|
129
129
|
<rb-text>{{rule.name}}</rb-text>
|
|
130
|
-
<rb-icon icon="icon-close" class="rb-remove-rule" @click="removeRule(rule)"></rb-icon>
|
|
130
|
+
<rb-icon icon="icon-close" class="rb-remove-rule" @click.stop="removeRule(rule)"></rb-icon>
|
|
131
131
|
</b-list-group-item>
|
|
132
132
|
<b-list-group-item @click="addRule" class="cursor-pointer">
|
|
133
133
|
<rb-icon :icon="iconAdd"></rb-icon>
|
|
@@ -221,12 +221,12 @@
|
|
|
221
221
|
currentInputName(val) {
|
|
222
222
|
this.field.input = UtFormConstructor.getInputTypeByName(this.currentInputName, this.field);
|
|
223
223
|
},
|
|
224
|
-
multiple() {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
},
|
|
224
|
+
// multiple() {
|
|
225
|
+
// let input = UtFormConstructor.getDefaultInput(this.field);
|
|
226
|
+
// if (this.field.multiple) {
|
|
227
|
+
// this.currentInputName = input.name;
|
|
228
|
+
// }
|
|
229
|
+
// },
|
|
230
230
|
},
|
|
231
231
|
methods: {
|
|
232
232
|
hide() {
|
|
@@ -265,13 +265,15 @@
|
|
|
265
265
|
this.ruleModalCfg = {
|
|
266
266
|
mode: 'ins',
|
|
267
267
|
rule: {
|
|
268
|
+
id: UtRandom.getRandomString(10),
|
|
268
269
|
name: null,
|
|
269
270
|
script: null,
|
|
270
271
|
},
|
|
271
272
|
onAfterOk: (rule) => {
|
|
272
273
|
this.field.rules = this.field.rules ? this.field.rules : [];
|
|
273
274
|
this.field.rules.push({
|
|
274
|
-
...rule
|
|
275
|
+
...rule,
|
|
276
|
+
id: rule.id || UtRandom.getRandomString(10),
|
|
275
277
|
});
|
|
276
278
|
this.rulesHash = UtRandom.getRandomString(10);
|
|
277
279
|
}
|
|
@@ -294,7 +296,7 @@
|
|
|
294
296
|
this.$bvModal.show(this.modalId);
|
|
295
297
|
},
|
|
296
298
|
removeRule(rule) {
|
|
297
|
-
|
|
299
|
+
const index = this.field.rules.indexOf(rule);
|
|
298
300
|
if (index >= 0) {
|
|
299
301
|
this.field.rules.splice(index, 1);
|
|
300
302
|
}
|