@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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @form-create/element-ui v3.2.3
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.
@@ -1628,7 +1628,7 @@
1628
1628
  var _this2 = this;
1629
1629
 
1630
1630
  n = n || [];
1631
- var keys = Object.keys(this.sort),
1631
+ var keys = this.sort,
1632
1632
  total = keys.length,
1633
1633
  len = total - n.length;
1634
1634
 
@@ -2278,7 +2278,13 @@
2278
2278
  });
2279
2279
  vue.watch(modelValue, function (n) {
2280
2280
  if (JSON.stringify(n || {}) === data.updateValue) return;
2281
- fapi.config.forceCoverValue ? fapi.coverValue(n || {}) : fapi.setValue(n || {});
2281
+
2282
+ if (fapi.config.forceCoverValue) {
2283
+ fc.$handle.appendData = {};
2284
+ fapi.coverValue(n || {});
2285
+ } else {
2286
+ fapi.setValue(n || {});
2287
+ }
2282
2288
  }, {
2283
2289
  deep: true
2284
2290
  });
@@ -2648,6 +2654,7 @@
2648
2654
  prop.key = rule.key;
2649
2655
  prop.ref = rule.ref;
2650
2656
  prop["class"] = rule["class"];
2657
+ prop.id = rule.id;
2651
2658
  prop.style = rule.style;
2652
2659
  if (prop.slot) delete prop.slot;
2653
2660
  return prop;
@@ -4552,7 +4559,6 @@
4552
4559
  this.$handle.watchCtx(this);
4553
4560
  },
4554
4561
  "delete": function _delete() {
4555
- var undef = void 0;
4556
4562
  this.unwatch();
4557
4563
  this.unlink();
4558
4564
  this.rmCtrl();
@@ -4563,13 +4569,7 @@
4563
4569
 
4564
4570
  extend(this, {
4565
4571
  deleted: true,
4566
- prop: _objectSpread2({}, this.rule),
4567
4572
  computed: {},
4568
- el: undef,
4569
- $handle: undef,
4570
- $api: undef,
4571
- vm: undef,
4572
- vNode: undef,
4573
4573
  parent: null,
4574
4574
  children: [],
4575
4575
  cacheConfig: null,
@@ -4796,18 +4796,15 @@
4796
4796
  if (isInit) {
4797
4797
  ctx = _rule.__fc__;
4798
4798
  defaultValue = ctx.defaultValue;
4799
- var check = !ctx.check(_this6);
4800
4799
 
4801
4800
  if (ctx.deleted) {
4802
- if (check) {
4803
- if (isCtrl(ctx)) {
4804
- return;
4805
- }
4806
-
4807
- ctx.update(_this6);
4801
+ if (isCtrl(ctx)) {
4802
+ return;
4808
4803
  }
4804
+
4805
+ ctx.update(_this6);
4809
4806
  } else {
4810
- if (check) {
4807
+ if (!ctx.check(_this6)) {
4811
4808
  if (isCtrl(ctx)) {
4812
4809
  return;
4813
4810
  }
@@ -5479,6 +5476,8 @@
5479
5476
  }
5480
5477
 
5481
5478
  Object.keys(computed).forEach(function (k) {
5479
+ var _val = deepGet(ctx.rule, k);
5480
+
5482
5481
  ctx.watch.push(vue.watch(function () {
5483
5482
  var item = computed[k];
5484
5483
  if (!item) return undefined;
@@ -5509,7 +5508,7 @@
5509
5508
  } else if (!condition[one.condition]) {
5510
5509
  flag = false;
5511
5510
  } else {
5512
- flag = new Function('_$', '_$val', 'top', 'group', "with(top){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] || {} : {});
5511
+ 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] || {} : {});
5513
5512
  }
5514
5513
 
5515
5514
  if (or && flag) {
@@ -5533,7 +5532,7 @@
5533
5532
  var _group = ctx.getParentGroup();
5534
5533
 
5535
5534
  fn = function fn() {
5536
- return new Function('formulas', 'top', 'group', '$rule', '$api', "with(top){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);
5535
+ 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);
5537
5536
  };
5538
5537
  }
5539
5538
 
@@ -5549,7 +5548,7 @@
5549
5548
  }
5550
5549
  });
5551
5550
  }, {
5552
- immediate: true
5551
+ immediate: _val == null || _val === ''
5553
5552
  }));
5554
5553
  });
5555
5554
  });
@@ -8109,7 +8108,7 @@
8109
8108
  function elmFormCreate() {
8110
8109
  return FormCreateFactory({
8111
8110
  ui: 'element-ui',
8112
- version: '3.2.3',
8111
+ version: '3.2.4',
8113
8112
  manager: manager,
8114
8113
  extendApi: extendApi,
8115
8114
  install: install,