@form-create/element-ui 3.2.3 → 3.2.4
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 +21 -22
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +21 -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.4
|
|
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
|
}
|
|
@@ -5475,6 +5472,8 @@ function useContext(Handler) {
|
|
|
5475
5472
|
}
|
|
5476
5473
|
|
|
5477
5474
|
Object.keys(computed).forEach(function (k) {
|
|
5475
|
+
var _val = deepGet(ctx.rule, k);
|
|
5476
|
+
|
|
5478
5477
|
ctx.watch.push(watch(function () {
|
|
5479
5478
|
var item = computed[k];
|
|
5480
5479
|
if (!item) return undefined;
|
|
@@ -5505,7 +5504,7 @@ function useContext(Handler) {
|
|
|
5505
5504
|
} else if (!condition[one.condition]) {
|
|
5506
5505
|
flag = false;
|
|
5507
5506
|
} else {
|
|
5508
|
-
flag = new Function('_$', '_$val', '
|
|
5507
|
+
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
5508
|
}
|
|
5510
5509
|
|
|
5511
5510
|
if (or && flag) {
|
|
@@ -5529,7 +5528,7 @@ function useContext(Handler) {
|
|
|
5529
5528
|
var _group = ctx.getParentGroup();
|
|
5530
5529
|
|
|
5531
5530
|
fn = function fn() {
|
|
5532
|
-
return new Function('
|
|
5531
|
+
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
5532
|
};
|
|
5534
5533
|
}
|
|
5535
5534
|
|
|
@@ -5545,7 +5544,7 @@ function useContext(Handler) {
|
|
|
5545
5544
|
}
|
|
5546
5545
|
});
|
|
5547
5546
|
}, {
|
|
5548
|
-
immediate:
|
|
5547
|
+
immediate: _val == null || _val === ''
|
|
5549
5548
|
}));
|
|
5550
5549
|
});
|
|
5551
5550
|
});
|
|
@@ -8105,7 +8104,7 @@ function install(FormCreate) {
|
|
|
8105
8104
|
function elmFormCreate() {
|
|
8106
8105
|
return FormCreateFactory({
|
|
8107
8106
|
ui: 'element-ui',
|
|
8108
|
-
version: '3.2.
|
|
8107
|
+
version: '3.2.4',
|
|
8109
8108
|
manager: manager,
|
|
8110
8109
|
extendApi: extendApi,
|
|
8111
8110
|
install: install,
|