@form-create/element-ui 3.2.14 → 3.2.15

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.14
2
+ * @form-create/element-ui v3.2.15
3
3
  * (c) 2018-2024 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -1418,7 +1418,7 @@
1418
1418
  onPreview: Function,
1419
1419
  modalTitle: String,
1420
1420
  listType: String,
1421
- modelValue: [Array, String]
1421
+ modelValue: [Array, String, Object]
1422
1422
  },
1423
1423
  emits: ['update:modelValue', 'change', 'remove', 'fc.el'],
1424
1424
  data: function data() {
@@ -1453,7 +1453,7 @@
1453
1453
  var files = fileList.map(function (v) {
1454
1454
  return v.is_string ? v.url : v.value || v.url;
1455
1455
  }).filter(function (url) {
1456
- return url !== undefined && url.indexOf('blob:') !== 0;
1456
+ return url !== undefined;
1457
1457
  });
1458
1458
  this.$emit('update:modelValue', files);
1459
1459
  },
@@ -2613,7 +2613,14 @@
2613
2613
  }
2614
2614
 
2615
2615
  if (!flag) return fn;
2616
- var val = makeFn(v);
2616
+ var val;
2617
+
2618
+ try {
2619
+ val = makeFn(v);
2620
+ } catch (e) {
2621
+ val = makeFn('function ' + v);
2622
+ }
2623
+
2617
2624
  val.__json = fn;
2618
2625
  return val;
2619
2626
  } catch (e) {
@@ -3690,6 +3697,13 @@
3690
3697
  getData: function getData(id, def) {
3691
3698
  return h.fc.getLoadData(id, def);
3692
3699
  },
3700
+ watchData: function watchData(fn) {
3701
+ return h.fc.watchLoadData(function (get, change) {
3702
+ invoke(function () {
3703
+ return fn(get, change);
3704
+ });
3705
+ });
3706
+ },
3693
3707
  setData: function setData(id, data, isGlobal) {
3694
3708
  return h.fc.setData(id, data, isGlobal);
3695
3709
  },
@@ -4370,7 +4384,7 @@
4370
4384
  },
4371
4385
  getInjectData: function getInjectData(self, inject) {
4372
4386
  var $api = self.__fc__ && self.__fc__.$api;
4373
- var vm = self.__fc__ && self.__fc__.$handle.vm || this.vm.props;
4387
+ var vm = self.__fc__ && self.__fc__.$handle.vm || this.vm;
4374
4388
  var _vm$props = vm.props,
4375
4389
  option = _vm$props.option,
4376
4390
  rule = _vm$props.rule;
@@ -4546,6 +4560,12 @@
4546
4560
  Object.defineProperties(ctx.origin, {
4547
4561
  __fc__: enumerable(vue.markRaw(ctx), true)
4548
4562
  });
4563
+
4564
+ if (ctx.rule !== ctx.origin) {
4565
+ Object.defineProperties(ctx.rule, {
4566
+ __fc__: enumerable(vue.markRaw(ctx), true)
4567
+ });
4568
+ }
4549
4569
  }
4550
4570
 
4551
4571
  function RuleContext(handle, rule, defaultValue) {
@@ -6613,6 +6633,8 @@
6613
6633
  this._fn[inject.id].forEach(function (un) {
6614
6634
  un();
6615
6635
  });
6636
+
6637
+ delete this._fn[inject.id];
6616
6638
  }
6617
6639
 
6618
6640
  inject.clearProp();
@@ -6675,6 +6697,8 @@
6675
6697
  this._fn[inject.id].forEach(function (un) {
6676
6698
  un();
6677
6699
  });
6700
+
6701
+ delete this._fn[inject.id];
6678
6702
  }
6679
6703
 
6680
6704
  inject.clearProp();
@@ -6754,6 +6778,13 @@
6754
6778
  deepSet(inject.getProp(), option.to || 'options', val);
6755
6779
  }
6756
6780
 
6781
+ if (val != null && option && option.key && fc.$handle.options.globalData[option.key]) {
6782
+ fc.fetchCache.set(fc.$handle.options.globalData[option.key], {
6783
+ status: true,
6784
+ data: val
6785
+ });
6786
+ }
6787
+
6757
6788
  api.sync(rule);
6758
6789
  };
6759
6790
 
@@ -6871,6 +6902,8 @@
6871
6902
  deleted: function deleted(inject) {
6872
6903
  if (this._fn[inject.id]) {
6873
6904
  this._fn[inject.id]();
6905
+
6906
+ delete this._fn[inject.id];
6874
6907
  }
6875
6908
 
6876
6909
  inject.clearProp();
@@ -7666,7 +7699,7 @@
7666
7699
  },
7667
7700
  mergeOptions: function mergeOptions(target, opt, parent) {
7668
7701
  opt = deepCopy(opt);
7669
- parent && ['page', 'onSubmit', 'mounted', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
7702
+ parent && ['page', 'onSubmit', 'onReset', 'onCreated', 'onChange', 'onMounted', 'mounted', 'onReload', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
7670
7703
  delete opt[n];
7671
7704
  });
7672
7705
 
@@ -8462,7 +8495,7 @@
8462
8495
  return maker;
8463
8496
  }
8464
8497
 
8465
- var css_248z = ".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-right .el-form-item__label{justify-content:flex-end}.fc-wrap-left .el-form-item__label{justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item .el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item .el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item .el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}";
8498
+ var css_248z = ".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}";
8466
8499
  styleInject(css_248z);
8467
8500
 
8468
8501
  function tidyBtnProp(btn, def) {
@@ -8722,7 +8755,7 @@
8722
8755
  function elmFormCreate() {
8723
8756
  return FormCreateFactory({
8724
8757
  ui: 'element-ui',
8725
- version: '3.2.14',
8758
+ version: '3.2.15',
8726
8759
  manager: manager,
8727
8760
  extendApi: extendApi,
8728
8761
  install: install,