@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.
@@ -2923,7 +2923,8 @@ function $FormCreate(FormCreate, components, directives) {
2923
2923
  fc.initOptions();
2924
2924
  fapi.refresh();
2925
2925
  }, {
2926
- deep: true
2926
+ deep: true,
2927
+ flush: 'sync'
2927
2928
  });
2928
2929
  watch(function () {
2929
2930
  return _toConsumableArray(rule.value);
@@ -3592,6 +3593,28 @@ function Api(h) {
3592
3593
  return origin ? ctx.origin : ctx.rule;
3593
3594
  }
3594
3595
  },
3596
+ findType: function findType(type, origin) {
3597
+ var rule = undefined;
3598
+ Object.keys(h.ctxs).forEach(function (k) {
3599
+ var ctx = h.ctxs[k];
3600
+
3601
+ if (ctx.rule.type === type) {
3602
+ rule = origin ? ctx.origin : ctx.rule;
3603
+ }
3604
+ });
3605
+ return rule;
3606
+ },
3607
+ findTypes: function findTypes(type, origin) {
3608
+ var rules = [];
3609
+ Object.keys(h.ctxs).forEach(function (k) {
3610
+ var ctx = h.ctxs[k];
3611
+
3612
+ if (ctx.rule.type === type) {
3613
+ rules.push(origin ? ctx.origin : ctx.rule);
3614
+ }
3615
+ });
3616
+ return rules;
3617
+ },
3595
3618
  getRenderRule: function getRenderRule(id) {
3596
3619
  var ctx = h.getCtx(id);
3597
3620
 
@@ -8203,7 +8226,8 @@ function FormCreateFactory(config) {
8203
8226
 
8204
8227
  _this2.$handle.api.refresh();
8205
8228
  }, {
8206
- deep: true
8229
+ deep: true,
8230
+ flush: 'sync'
8207
8231
  }));
8208
8232
  }
8209
8233
 
@@ -8389,17 +8413,11 @@ function FormCreateFactory(config) {
8389
8413
  var handle = is.Function(option) ? option : parseFn(option.handle);
8390
8414
 
8391
8415
  if (handle) {
8392
- var val;
8393
- var unwatch = this.watchLoadData(function (get, flag) {
8394
- if (flag) {
8395
- _this5.bus.$emit('$loadData.$var.' + key);
8416
+ var val = handle(function () {
8417
+ var _this5$$handle$api;
8396
8418
 
8397
- unwatch();
8398
- } else {
8399
- val = handle(get, _this5.$handle.api);
8400
- }
8401
- });
8402
- this.unwatch.push(unwatch);
8419
+ return (_this5$$handle$api = _this5.$handle.api).getData.apply(_this5$$handle$api, arguments);
8420
+ }, this.$handle.api);
8403
8421
  return deepGet(val, split);
8404
8422
  }
8405
8423
  }
@@ -9416,6 +9434,9 @@ function extendApi(api, h) {
9416
9434
  h.vm.emit('validate-fail', e, {
9417
9435
  api: api
9418
9436
  });
9437
+ h.emitEvent('validate-fail', e, {
9438
+ api: api
9439
+ });
9419
9440
  });
9420
9441
  });
9421
9442
  },
@@ -9649,7 +9670,7 @@ function install(FormCreate) {
9649
9670
  function elmFormCreate() {
9650
9671
  return FormCreateFactory({
9651
9672
  ui: 'element-ui',
9652
- version: '3.2.27',
9673
+ version: '3.2.28',
9653
9674
  manager: manager,
9654
9675
  extendApi: extendApi,
9655
9676
  install: install,