@form-create/element-ui 3.2.39 → 3.2.41

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.39
2
+ * @form-create/element-ui v3.2.41
3
3
  * (c) 2018-2026 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -2909,7 +2909,7 @@ function $FormCreate(FormCreate, components, directives) {
2909
2909
  },
2910
2910
  inFor: Boolean
2911
2911
  },
2912
- emits: ['update:api', 'update:modelValue', 'mounted', 'submit', 'reset', 'change', 'emit-event', 'control', 'remove-rule', 'remove-field', 'sync', 'reload', 'repeat-field', 'update', 'validate-field-fail', 'validate-fail', 'created'],
2912
+ emits: ['update:api', 'update:modelValue', 'mounted', 'beforeUnmount', 'submit', 'reset', 'change', 'emit-event', 'control', 'remove-rule', 'remove-field', 'sync', 'reload', 'repeat-field', 'update', 'validate-field-fail', 'validate-fail', 'created'],
2913
2913
  render: function render() {
2914
2914
  return this.fc.render();
2915
2915
  },
@@ -4045,9 +4045,10 @@ function Api(h) {
4045
4045
 
4046
4046
  return (_h$vm$setupState$getG = h.vm.setupState.getGroupInject()) === null || _h$vm$setupState$getG === void 0 ? void 0 : _h$vm$setupState$getG.rule;
4047
4047
  },
4048
- fetch: function fetch(opt) {
4048
+ fetch: function fetch(_opt) {
4049
4049
  return new Promise(function (resolve, reject) {
4050
- opt = deepCopy(opt);
4050
+ var opt = _objectSpread2({}, _opt);
4051
+
4051
4052
  opt = h.loadFetchVar(opt);
4052
4053
 
4053
4054
  var fail = function fail(e) {
@@ -4073,7 +4074,7 @@ function Api(h) {
4073
4074
  },
4074
4075
  watchFetch: function watchFetch(opt, callback, error, beforeFetch) {
4075
4076
  return h.fc.watchLoadData(function (get, change) {
4076
- var _opt = deepCopy(opt);
4077
+ var _opt = _objectSpread2({}, opt);
4077
4078
 
4078
4079
  _opt = h.loadFetchVar(_opt, get);
4079
4080
 
@@ -4337,6 +4338,8 @@ function useRender$1(Render) {
4337
4338
  }
4338
4339
 
4339
4340
  vn = function vn() {
4341
+ var _prop$col;
4342
+
4340
4343
  for (var _len = arguments.length, slotValue = new Array(_len), _key = 0; _key < _len; _key++) {
4341
4344
  slotValue[_key] = arguments[_key];
4342
4345
  }
@@ -4399,7 +4402,7 @@ function useRender$1(Render) {
4399
4402
 
4400
4403
  _vn = _this4.renderSides(_vn, ctx);
4401
4404
 
4402
- if ((ctx.input || !is.Undef(prop["native"]) || prop.col.show !== false) && prop["native"] !== true) {
4405
+ if ((!(!ctx.input && is.Undef(prop["native"])) || ((_prop$col = prop.col) === null || _prop$col === void 0 ? void 0 : _prop$col.show) === true) && prop["native"] !== true) {
4403
4406
  _this4.fc.targetFormDriver('updateWrap', ctx);
4404
4407
 
4405
4408
  _vn = _this4.$manager.makeWrap(ctx, _vn);
@@ -4956,6 +4959,10 @@ function useInject(Handler) {
4956
4959
  group = rule.__fc__.getParentGroup();
4957
4960
  }
4958
4961
 
4962
+ if (!group && options.targetRule && options.targetRule.__fc__) {
4963
+ group = options.targetRule.__fc__.getParentGroup();
4964
+ }
4965
+
4959
4966
  var loadVal = function loadVal(str) {
4960
4967
  return _this4.loadStrVar(str, get, group ? {
4961
4968
  rule: rule,
@@ -5242,6 +5249,7 @@ extend(RuleContext.prototype, {
5242
5249
  },
5243
5250
  initProp: function initProp() {
5244
5251
  var _this3 = this,
5252
+ _rule$col,
5245
5253
  _this$refRule,
5246
5254
  _this$refRule$__$vali;
5247
5255
 
@@ -5252,6 +5260,11 @@ extend(RuleContext.prototype, {
5252
5260
  this.prop = mergeRule({}, [rule].concat(_toConsumableArray(Object.keys(this.payload).map(function (k) {
5253
5261
  return _this3.payload[k];
5254
5262
  })), [this.computed]));
5263
+
5264
+ if (rule.col && ((_rule$col = rule.col) === null || _rule$col === void 0 ? void 0 : _rule$col.show) !== false) {
5265
+ this.prop.col.show = true;
5266
+ }
5267
+
5255
5268
  this.prop.validate = [].concat(_toConsumableArray(((_this$refRule = this.refRule) === null || _this$refRule === void 0 ? void 0 : (_this$refRule$__$vali = _this$refRule.__$validate) === null || _this$refRule$__$vali === void 0 ? void 0 : _this$refRule$__$vali.value) || []), _toConsumableArray(this.prop.validate || []));
5256
5269
  },
5257
5270
  initNone: function initNone() {
@@ -8777,7 +8790,7 @@ function FormCreateFactory(config) {
8777
8790
  },
8778
8791
  mergeOptions: function mergeOptions(target, opt, parent) {
8779
8792
  opt = _objectSpread2({}, opt || {});
8780
- parent && ['page', 'onSubmit', 'onReset', 'onCreated', 'onChange', 'onMounted', 'mounted', 'onReload', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
8793
+ parent && ['page', 'onSubmit', 'onReset', 'onCreated', 'onChange', 'onMounted', 'mounted', 'beforeUnmount', 'onBeforeUnmount', 'onReload', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
8781
8794
  delete opt[n];
8782
8795
  });
8783
8796
 
@@ -8806,6 +8819,10 @@ function FormCreateFactory(config) {
8806
8819
  unmount: function unmount() {
8807
8820
  var _this7 = this;
8808
8821
 
8822
+ invoke(function () {
8823
+ return _this7.$handle.lifecycle('beforeUnmount');
8824
+ });
8825
+
8809
8826
  if (this.name) {
8810
8827
  if (this.inFor) {
8811
8828
  var idx = instance[this.name].indexOf(this);
@@ -9431,7 +9448,9 @@ var manager = {
9431
9448
  return this.$r(_prop, children);
9432
9449
  },
9433
9450
  makeCol: function makeCol(rule, uni, children) {
9434
- var col = rule.col;
9451
+ var col = _objectSpread2({}, rule.col);
9452
+
9453
+ delete col.show;
9435
9454
  return this.$r({
9436
9455
  "class": this.$render.mergeClass(col["class"], 'fc-form-col'),
9437
9456
  type: 'col',
@@ -9902,7 +9921,7 @@ function install(FormCreate) {
9902
9921
  function elmFormCreate() {
9903
9922
  return FormCreateFactory({
9904
9923
  ui: 'element-ui',
9905
- version: '3.2.39',
9924
+ version: '3.2.41',
9906
9925
  manager: manager,
9907
9926
  extendApi: extendApi,
9908
9927
  install: install,