@form-create/element-ui 3.2.26 → 3.2.27

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.26
2
+ * @form-create/element-ui v3.2.27
3
3
  * (c) 2018-2025 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -3813,6 +3813,12 @@ function Api(h) {
3813
3813
  }
3814
3814
  });
3815
3815
  },
3816
+ setGlobalData: function setGlobalData(name, value) {
3817
+ api.setData('$globalData.' + name, value);
3818
+ },
3819
+ setGlobalVar: function setGlobalVar(name, value) {
3820
+ api.setData('$var.' + name, value);
3821
+ },
3816
3822
  renderRule: function renderRule(id, onInput, force) {
3817
3823
  var flag = _typeof(id) === 'object';
3818
3824
  var ctx = flag ? byCtx(id) : h.getCtx(id);
@@ -4314,6 +4320,9 @@ function useRender$1(Render) {
4314
4320
  slots: function slots() {
4315
4321
  return _this6.vm.setupState.top.slots;
4316
4322
  },
4323
+ getWrap: function getWrap() {
4324
+ return _this6.vm.refs[ctx.wrapRef];
4325
+ },
4317
4326
  options: [],
4318
4327
  children: [],
4319
4328
  preview: false,
@@ -5662,6 +5671,8 @@ function useInput(Handler) {
5662
5671
  });
5663
5672
  });
5664
5673
  }
5674
+
5675
+ this.$manager.fieldChange(ctx, value, formValue, setFlag);
5665
5676
  },
5666
5677
  onInput: function onInput(ctx, value) {
5667
5678
  var val;
@@ -7303,6 +7314,7 @@ extend(Manager.prototype, {
7303
7314
  getDefaultOptions: function getDefaultOptions() {
7304
7315
  return {};
7305
7316
  },
7317
+ fieldChange: function fieldChange(ctx, value, formValue, setFlag) {},
7306
7318
  render: function render(children) {}
7307
7319
  });
7308
7320
 
@@ -8406,8 +8418,11 @@ function FormCreateFactory(config) {
8406
8418
  if (id != null) {
8407
8419
  var split = id.split('.');
8408
8420
  var key = split.shift();
8421
+ val = deepGet(this.vm.setupState.top.setupState.fc.tmpData, id);
8409
8422
 
8410
- if (key === '$topForm') {
8423
+ if (val != null) {
8424
+ return val;
8425
+ } else if (key === '$topForm') {
8411
8426
  val = this.$handle.api.top.formData(true);
8412
8427
  } else if (key === '$scopeForm') {
8413
8428
  val = this.$handle.api.scope.formData(true);
@@ -8430,13 +8445,7 @@ function FormCreateFactory(config) {
8430
8445
  } else if (key === '$preview') {
8431
8446
  return this.$handle.preview;
8432
8447
  } else {
8433
- var tmpData = this.vm.setupState.top.setupState.fc.tmpData;
8434
-
8435
- if (!hasProperty(tmpData, key)) {
8436
- tmpData[key] = defValueTag;
8437
- }
8438
-
8439
- val = tmpData[key] !== defValueTag ? deepGet(tmpData, id) : getData(id);
8448
+ val = getData(id);
8440
8449
  split = [];
8441
8450
  }
8442
8451
 
@@ -8995,6 +9004,13 @@ var manager = {
8995
9004
  fItem.clearValidate();
8996
9005
  }
8997
9006
  },
9007
+ fieldChange: function fieldChange(ctx, value, formValue, setFlag) {
9008
+ if (!setFlag) {
9009
+ var _this$vm$refs$ctx$wra, _this$vm$refs$ctx$wra2;
9010
+
9011
+ (_this$vm$refs$ctx$wra = this.vm.refs[ctx.wrapRef]) === null || _this$vm$refs$ctx$wra === void 0 ? void 0 : (_this$vm$refs$ctx$wra2 = _this$vm$refs$ctx$wra.validate('change')) === null || _this$vm$refs$ctx$wra2 === void 0 ? void 0 : _this$vm$refs$ctx$wra2["catch"](function () {});
9012
+ }
9013
+ },
8998
9014
  tidyOptions: function tidyOptions(options) {
8999
9015
  ['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(function (name) {
9000
9016
  tidyBool(options, name);
@@ -9633,7 +9649,7 @@ function install(FormCreate) {
9633
9649
  function elmFormCreate() {
9634
9650
  return FormCreateFactory({
9635
9651
  ui: 'element-ui',
9636
- version: '3.2.26',
9652
+ version: '3.2.27',
9637
9653
  manager: manager,
9638
9654
  extendApi: extendApi,
9639
9655
  install: install,