@form-create/element-ui 3.2.3 → 3.2.5
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/form-create.esm.js +19 -22
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +19 -22
- package/dist/form-create.min.js +2 -2
- package/package.json +5 -5
package/dist/form-create.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.2.
|
|
2
|
+
* @form-create/element-ui v3.2.5
|
|
3
3
|
* (c) 2018-2024 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -1624,7 +1624,7 @@ var Group = defineComponent({
|
|
|
1624
1624
|
var _this2 = this;
|
|
1625
1625
|
|
|
1626
1626
|
n = n || [];
|
|
1627
|
-
var keys =
|
|
1627
|
+
var keys = this.sort,
|
|
1628
1628
|
total = keys.length,
|
|
1629
1629
|
len = total - n.length;
|
|
1630
1630
|
|
|
@@ -2274,7 +2274,13 @@ function $FormCreate(FormCreate, components, directives) {
|
|
|
2274
2274
|
});
|
|
2275
2275
|
watch(modelValue, function (n) {
|
|
2276
2276
|
if (JSON.stringify(n || {}) === data.updateValue) return;
|
|
2277
|
-
|
|
2277
|
+
|
|
2278
|
+
if (fapi.config.forceCoverValue) {
|
|
2279
|
+
fc.$handle.appendData = {};
|
|
2280
|
+
fapi.coverValue(n || {});
|
|
2281
|
+
} else {
|
|
2282
|
+
fapi.setValue(n || {});
|
|
2283
|
+
}
|
|
2278
2284
|
}, {
|
|
2279
2285
|
deep: true
|
|
2280
2286
|
});
|
|
@@ -2644,6 +2650,7 @@ function toProps(rule) {
|
|
|
2644
2650
|
prop.key = rule.key;
|
|
2645
2651
|
prop.ref = rule.ref;
|
|
2646
2652
|
prop["class"] = rule["class"];
|
|
2653
|
+
prop.id = rule.id;
|
|
2647
2654
|
prop.style = rule.style;
|
|
2648
2655
|
if (prop.slot) delete prop.slot;
|
|
2649
2656
|
return prop;
|
|
@@ -4548,7 +4555,6 @@ extend(RuleContext.prototype, {
|
|
|
4548
4555
|
this.$handle.watchCtx(this);
|
|
4549
4556
|
},
|
|
4550
4557
|
"delete": function _delete() {
|
|
4551
|
-
var undef = void 0;
|
|
4552
4558
|
this.unwatch();
|
|
4553
4559
|
this.unlink();
|
|
4554
4560
|
this.rmCtrl();
|
|
@@ -4559,13 +4565,7 @@ extend(RuleContext.prototype, {
|
|
|
4559
4565
|
|
|
4560
4566
|
extend(this, {
|
|
4561
4567
|
deleted: true,
|
|
4562
|
-
prop: _objectSpread2({}, this.rule),
|
|
4563
4568
|
computed: {},
|
|
4564
|
-
el: undef,
|
|
4565
|
-
$handle: undef,
|
|
4566
|
-
$api: undef,
|
|
4567
|
-
vm: undef,
|
|
4568
|
-
vNode: undef,
|
|
4569
4569
|
parent: null,
|
|
4570
4570
|
children: [],
|
|
4571
4571
|
cacheConfig: null,
|
|
@@ -4792,18 +4792,15 @@ function useLoader(Handler) {
|
|
|
4792
4792
|
if (isInit) {
|
|
4793
4793
|
ctx = _rule.__fc__;
|
|
4794
4794
|
defaultValue = ctx.defaultValue;
|
|
4795
|
-
var check = !ctx.check(_this6);
|
|
4796
4795
|
|
|
4797
4796
|
if (ctx.deleted) {
|
|
4798
|
-
if (
|
|
4799
|
-
|
|
4800
|
-
return;
|
|
4801
|
-
}
|
|
4802
|
-
|
|
4803
|
-
ctx.update(_this6);
|
|
4797
|
+
if (isCtrl(ctx)) {
|
|
4798
|
+
return;
|
|
4804
4799
|
}
|
|
4800
|
+
|
|
4801
|
+
ctx.update(_this6);
|
|
4805
4802
|
} else {
|
|
4806
|
-
if (check) {
|
|
4803
|
+
if (!ctx.check(_this6)) {
|
|
4807
4804
|
if (isCtrl(ctx)) {
|
|
4808
4805
|
return;
|
|
4809
4806
|
}
|
|
@@ -5505,7 +5502,7 @@ function useContext(Handler) {
|
|
|
5505
5502
|
} else if (!condition[one.condition]) {
|
|
5506
5503
|
flag = false;
|
|
5507
5504
|
} else {
|
|
5508
|
-
flag = new Function('_$', '_$val', '
|
|
5505
|
+
flag = new Function('_$', '_$val', '$form', '_group', "with($form){with(this){with(_group){ return _$['".concat(one.condition, "'](").concat(one.field, ", ").concat(one.compare ? one.compare : '_$val', "); }}}")).call(_this.api.form, condition, one.value, _this.api.top.form, group ? _this.subRuleData[group.id] || {} : {});
|
|
5509
5506
|
}
|
|
5510
5507
|
|
|
5511
5508
|
if (or && flag) {
|
|
@@ -5529,7 +5526,7 @@ function useContext(Handler) {
|
|
|
5529
5526
|
var _group = ctx.getParentGroup();
|
|
5530
5527
|
|
|
5531
5528
|
fn = function fn() {
|
|
5532
|
-
return new Function('
|
|
5529
|
+
return new Function('_formulas', '$form', '_group', '$rule', '$api', "with($form){with(this){with(_group){with(_formulas){ return ".concat(item, " }}}}")).call(_this.api.form, _this.fc.formulas, _this.api.top.form, _group ? _this.subRuleData[_group.id] || {} : {}, ctx.rule, _this.api);
|
|
5533
5530
|
};
|
|
5534
5531
|
}
|
|
5535
5532
|
|
|
@@ -5545,7 +5542,7 @@ function useContext(Handler) {
|
|
|
5545
5542
|
}
|
|
5546
5543
|
});
|
|
5547
5544
|
}, {
|
|
5548
|
-
immediate: true
|
|
5545
|
+
immediate: k === 'value' ? [undefined, null, ''].indexOf(ctx.rule.value) > -1 : true
|
|
5549
5546
|
}));
|
|
5550
5547
|
});
|
|
5551
5548
|
});
|
|
@@ -8105,7 +8102,7 @@ function install(FormCreate) {
|
|
|
8105
8102
|
function elmFormCreate() {
|
|
8106
8103
|
return FormCreateFactory({
|
|
8107
8104
|
ui: 'element-ui',
|
|
8108
|
-
version: '3.2.
|
|
8105
|
+
version: '3.2.5',
|
|
8109
8106
|
manager: manager,
|
|
8110
8107
|
extendApi: extendApi,
|
|
8111
8108
|
install: install,
|