@form-create/element-ui 3.2.27 → 3.2.28

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.27
2
+ * @form-create/element-ui v3.2.28
3
3
  * (c) 2018-2025 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -2927,7 +2927,8 @@
2927
2927
  fc.initOptions();
2928
2928
  fapi.refresh();
2929
2929
  }, {
2930
- deep: true
2930
+ deep: true,
2931
+ flush: 'sync'
2931
2932
  });
2932
2933
  vue.watch(function () {
2933
2934
  return _toConsumableArray(rule.value);
@@ -3596,6 +3597,28 @@
3596
3597
  return origin ? ctx.origin : ctx.rule;
3597
3598
  }
3598
3599
  },
3600
+ findType: function findType(type, origin) {
3601
+ var rule = undefined;
3602
+ Object.keys(h.ctxs).forEach(function (k) {
3603
+ var ctx = h.ctxs[k];
3604
+
3605
+ if (ctx.rule.type === type) {
3606
+ rule = origin ? ctx.origin : ctx.rule;
3607
+ }
3608
+ });
3609
+ return rule;
3610
+ },
3611
+ findTypes: function findTypes(type, origin) {
3612
+ var rules = [];
3613
+ Object.keys(h.ctxs).forEach(function (k) {
3614
+ var ctx = h.ctxs[k];
3615
+
3616
+ if (ctx.rule.type === type) {
3617
+ rules.push(origin ? ctx.origin : ctx.rule);
3618
+ }
3619
+ });
3620
+ return rules;
3621
+ },
3599
3622
  getRenderRule: function getRenderRule(id) {
3600
3623
  var ctx = h.getCtx(id);
3601
3624
 
@@ -8207,7 +8230,8 @@
8207
8230
 
8208
8231
  _this2.$handle.api.refresh();
8209
8232
  }, {
8210
- deep: true
8233
+ deep: true,
8234
+ flush: 'sync'
8211
8235
  }));
8212
8236
  }
8213
8237
 
@@ -8393,17 +8417,11 @@
8393
8417
  var handle = is.Function(option) ? option : parseFn(option.handle);
8394
8418
 
8395
8419
  if (handle) {
8396
- var val;
8397
- var unwatch = this.watchLoadData(function (get, flag) {
8398
- if (flag) {
8399
- _this5.bus.$emit('$loadData.$var.' + key);
8420
+ var val = handle(function () {
8421
+ var _this5$$handle$api;
8400
8422
 
8401
- unwatch();
8402
- } else {
8403
- val = handle(get, _this5.$handle.api);
8404
- }
8405
- });
8406
- this.unwatch.push(unwatch);
8423
+ return (_this5$$handle$api = _this5.$handle.api).getData.apply(_this5$$handle$api, arguments);
8424
+ }, this.$handle.api);
8407
8425
  return deepGet(val, split);
8408
8426
  }
8409
8427
  }
@@ -9420,6 +9438,9 @@
9420
9438
  h.vm.emit('validate-fail', e, {
9421
9439
  api: api
9422
9440
  });
9441
+ h.emitEvent('validate-fail', e, {
9442
+ api: api
9443
+ });
9423
9444
  });
9424
9445
  });
9425
9446
  },
@@ -9653,7 +9674,7 @@
9653
9674
  function elmFormCreate() {
9654
9675
  return FormCreateFactory({
9655
9676
  ui: 'element-ui',
9656
- version: '3.2.27',
9677
+ version: '3.2.28',
9657
9678
  manager: manager,
9658
9679
  extendApi: extendApi,
9659
9680
  install: install,