@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.
package/README.md CHANGED
@@ -35,14 +35,12 @@
35
35
  - 支持子表单和分组
36
36
  - 高性能
37
37
  - **适配移动端**
38
+ - **多语言**
38
39
 
39
40
  ## 支持的UI框架
40
- - element-plus
41
- - ant-design-vue
42
- - naive-ui
43
- - arco-design
44
- - tdesign
45
- - vant
41
+
42
+ [![FcDesigner](https://static.form-create.com/file/img/products.jpg)](https://form-create.com/)
43
+
46
44
 
47
45
  > 如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create/issues/new)
48
46
 
@@ -86,8 +84,11 @@
86
84
  | @form-create/arco-design [![version](https://img.shields.io/npm/v/@form-create/arco-design/next.svg)](https://www.npmjs.com/package/@form-create/arco-design) [![npm](https://img.shields.io/npm/dt/@form-create/arco-design.svg)](https://www.npmjs.com/package/@form-create/arco-design) | [arco-design 版本](http://form-create.com/v3/arco-design/) |
87
85
  | @form-create/naive-ui [![version](https://img.shields.io/npm/v/@form-create/naive-ui/next.svg)](https://www.npmjs.com/package/@form-create/naive-ui) [![npm](https://img.shields.io/npm/dt/@form-create/naive-ui.svg)](https://www.npmjs.com/package/@form-create/naive-ui) | [naive-ui 版本](http://form-create.com/v3/naive-ui/) |
88
86
  | @form-create/tdesign [![version](https://img.shields.io/npm/v/@form-create/tdesign/next.svg)](https://www.npmjs.com/package/@form-create/tdesign) [![npm](https://img.shields.io/npm/dt/@form-create/tdesign.svg)](https://www.npmjs.com/package/@form-create/tdesign) | [tdesign 版本](http://form-create.com/v3/tdesign/) |
87
+ | @form-create/iview [![version](https://img.shields.io/npm/v/@form-create/iview.svg)](https://www.npmjs.com/package/@form-create/iview) [![npm](https://img.shields.io/npm/dt/@form-create/iview.svg)](https://www.npmjs.com/package/@form-create/iview) | [iview 版本](http://form-create.com/v2/iview/) |
88
+ | @form-create/view-design [![version](https://img.shields.io/npm/v/@form-create/view-design.svg)](https://www.npmjs.com/package/@form-create/view-design) [![npm](https://img.shields.io/npm/dt/@form-create/view-design.svg)](https://www.npmjs.com/package/@form-create/view-design) | [view-design 版本](http://form-create.com/v2/iview/) |
89
89
  | @form-create/vant [![version](https://img.shields.io/npm/v/@form-create/vant.svg)](https://www.npmjs.com/package/@form-create/vant) [![npm](https://img.shields.io/npm/dt/@form-create/vant.svg)](https://www.npmjs.com/package/@form-create/vant) | [vant 版本(移动端)](http://form-create.com/v3/vant/) |
90
- | @form-create/designer [![version](https://img.shields.io/npm/v/@form-create/designer.svg)](https://www.npmjs.com/package/@form-create/designer) [![npm](https://img.shields.io/npm/dt/@form-create/designer.svg)](https://www.npmjs.com/package/@form-create/designer) | [可视化表单设计器](http://form-create.com/designer) |
90
+ | @form-create/designer [![version](https://img.shields.io/npm/v/@form-create/designer.svg)](https://www.npmjs.com/package/@form-create/designer) [![npm](https://img.shields.io/npm/dt/@form-create/designer.svg)](https://www.npmjs.com/package/@form-create/designer) | [可视化表单设计器](http://form-create.com/v3/designer) |
91
+ | @form-create/vant-designer [![version](https://img.shields.io/npm/v/@form-create/vant-designer.svg)](https://www.npmjs.com/package/@form-create/designer) [![npm](https://img.shields.io/npm/dt/@form-create/vant-designer.svg)](https://www.npmjs.com/package/@form-create/designer) | [移动端表单设计器](http://form-create.com/v3/vant-designer) |
91
92
 
92
93
 
93
94
  ## 示例
@@ -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.
@@ -1414,7 +1414,7 @@ var Upload = defineComponent({
1414
1414
  onPreview: Function,
1415
1415
  modalTitle: String,
1416
1416
  listType: String,
1417
- modelValue: [Array, String]
1417
+ modelValue: [Array, String, Object]
1418
1418
  },
1419
1419
  emits: ['update:modelValue', 'change', 'remove', 'fc.el'],
1420
1420
  data: function data() {
@@ -1449,7 +1449,7 @@ var Upload = defineComponent({
1449
1449
  var files = fileList.map(function (v) {
1450
1450
  return v.is_string ? v.url : v.value || v.url;
1451
1451
  }).filter(function (url) {
1452
- return url !== undefined && url.indexOf('blob:') !== 0;
1452
+ return url !== undefined;
1453
1453
  });
1454
1454
  this.$emit('update:modelValue', files);
1455
1455
  },
@@ -2609,7 +2609,14 @@ function parseFn(fn, mode) {
2609
2609
  }
2610
2610
 
2611
2611
  if (!flag) return fn;
2612
- var val = makeFn(v);
2612
+ var val;
2613
+
2614
+ try {
2615
+ val = makeFn(v);
2616
+ } catch (e) {
2617
+ val = makeFn('function ' + v);
2618
+ }
2619
+
2613
2620
  val.__json = fn;
2614
2621
  return val;
2615
2622
  } catch (e) {
@@ -3686,6 +3693,13 @@ function Api(h) {
3686
3693
  getData: function getData(id, def) {
3687
3694
  return h.fc.getLoadData(id, def);
3688
3695
  },
3696
+ watchData: function watchData(fn) {
3697
+ return h.fc.watchLoadData(function (get, change) {
3698
+ invoke(function () {
3699
+ return fn(get, change);
3700
+ });
3701
+ });
3702
+ },
3689
3703
  setData: function setData(id, data, isGlobal) {
3690
3704
  return h.fc.setData(id, data, isGlobal);
3691
3705
  },
@@ -4366,7 +4380,7 @@ function useInject(Handler) {
4366
4380
  },
4367
4381
  getInjectData: function getInjectData(self, inject) {
4368
4382
  var $api = self.__fc__ && self.__fc__.$api;
4369
- var vm = self.__fc__ && self.__fc__.$handle.vm || this.vm.props;
4383
+ var vm = self.__fc__ && self.__fc__.$handle.vm || this.vm;
4370
4384
  var _vm$props = vm.props,
4371
4385
  option = _vm$props.option,
4372
4386
  rule = _vm$props.rule;
@@ -4542,6 +4556,12 @@ function bind(ctx) {
4542
4556
  Object.defineProperties(ctx.origin, {
4543
4557
  __fc__: enumerable(markRaw(ctx), true)
4544
4558
  });
4559
+
4560
+ if (ctx.rule !== ctx.origin) {
4561
+ Object.defineProperties(ctx.rule, {
4562
+ __fc__: enumerable(markRaw(ctx), true)
4563
+ });
4564
+ }
4545
4565
  }
4546
4566
 
4547
4567
  function RuleContext(handle, rule, defaultValue) {
@@ -6609,6 +6629,8 @@ var loadData = function loadData(fc) {
6609
6629
  this._fn[inject.id].forEach(function (un) {
6610
6630
  un();
6611
6631
  });
6632
+
6633
+ delete this._fn[inject.id];
6612
6634
  }
6613
6635
 
6614
6636
  inject.clearProp();
@@ -6671,6 +6693,8 @@ var t = function t(fc) {
6671
6693
  this._fn[inject.id].forEach(function (un) {
6672
6694
  un();
6673
6695
  });
6696
+
6697
+ delete this._fn[inject.id];
6674
6698
  }
6675
6699
 
6676
6700
  inject.clearProp();
@@ -6750,6 +6774,13 @@ var fetch = function fetch(fc) {
6750
6774
  deepSet(inject.getProp(), option.to || 'options', val);
6751
6775
  }
6752
6776
 
6777
+ if (val != null && option && option.key && fc.$handle.options.globalData[option.key]) {
6778
+ fc.fetchCache.set(fc.$handle.options.globalData[option.key], {
6779
+ status: true,
6780
+ data: val
6781
+ });
6782
+ }
6783
+
6753
6784
  api.sync(rule);
6754
6785
  };
6755
6786
 
@@ -6867,6 +6898,8 @@ var fetch = function fetch(fc) {
6867
6898
  deleted: function deleted(inject) {
6868
6899
  if (this._fn[inject.id]) {
6869
6900
  this._fn[inject.id]();
6901
+
6902
+ delete this._fn[inject.id];
6870
6903
  }
6871
6904
 
6872
6905
  inject.clearProp();
@@ -7662,7 +7695,7 @@ function FormCreateFactory(config) {
7662
7695
  },
7663
7696
  mergeOptions: function mergeOptions(target, opt, parent) {
7664
7697
  opt = deepCopy(opt);
7665
- parent && ['page', 'onSubmit', 'mounted', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
7698
+ parent && ['page', 'onSubmit', 'onReset', 'onCreated', 'onChange', 'onMounted', 'mounted', 'onReload', 'reload', 'formData', 'el', 'globalClass', 'style'].forEach(function (n) {
7666
7699
  delete opt[n];
7667
7700
  });
7668
7701
 
@@ -8458,7 +8491,7 @@ function useFrame(maker) {
8458
8491
  return maker;
8459
8492
  }
8460
8493
 
8461
- 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}";
8494
+ 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}";
8462
8495
  styleInject(css_248z);
8463
8496
 
8464
8497
  function tidyBtnProp(btn, def) {
@@ -8718,7 +8751,7 @@ function install(FormCreate) {
8718
8751
  function elmFormCreate() {
8719
8752
  return FormCreateFactory({
8720
8753
  ui: 'element-ui',
8721
- version: '3.2.14',
8754
+ version: '3.2.15',
8722
8755
  manager: manager,
8723
8756
  extendApi: extendApi,
8724
8757
  install: install,