@form-create/element-ui 3.2.10 → 3.2.12

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
@@ -1,30 +1,117 @@
1
- # @form-create/element-ui
2
- **form-create 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的表单生成组件。支持6个UI框架,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。**
1
+ <p align="center">
2
+ <a href="https://www.form-create.com" target="_blank">
3
+ <img width="300" alt="FormCreate" src="https://static.form-create.com/file/img/info-logo2.png">
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ 基于Element Plus的低代码表单生成组件
8
+ </p>
3
9
 
4
- form-create is a form generation component that can generate dynamic rendering, data collection, verification and submission functions through JSON. Supports 5 UI frameworks, and supports the generation of any Vue components. Built-in 20 kinds of commonly used form components and custom components, no matter how complex forms can be easily handled.
10
+ <p align="center">
11
+ <a href="https://www.form-create.com/" target="_blank">官网</a>
12
+ <span>&nbsp;|&nbsp;</span>
13
+ <a href="https://form-create.com/v3/guide/" target="_blank">帮助文档</a>
14
+ <span>&nbsp;|&nbsp;</span>
15
+ <a href="https://pro.form-create.com/view/" target="_blank">可视化表单设计器</a>
16
+ <span>&nbsp;|&nbsp;</span>
17
+ <a href="https://pro.form-create.com/mobile/" target="_blank">移动端表单设计器</a>
18
+ </p>
5
19
 
6
- > form-create element-ui 动态表单组件
7
- >
8
- > form-create element-ui Dynamic form component
20
+ <p align="center">
21
+ <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="TIM" /></a>
22
+ <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/npm/dt/@form-create/element-ui.svg" alt="dt" /></a>
23
+ </p>
9
24
 
10
- [GitHub](https://github.com/xaboy/form-create) | [文档](http://form-create.com/v3/element-ui/)
25
+ **FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。**
26
+
27
+ [![FcDesigner](https://static.form-create.com/file/img/banner-m2.jpg)](https://pro.form-create.com/view)
28
+
29
+ ## 特点
30
+ - 使用JSON数据生成表单
31
+ - 支持扩展,生成任何Vue组件和HTML标签
32
+ - 支持6个UI框架
33
+ - 支持组件之间联动
34
+ - 提供丰富的表单操作API
35
+ - 支持子表单和分组
36
+ - 高性能
37
+ - **适配移动端**
38
+
39
+ ## 支持的UI框架
40
+ - element-plus
41
+ - ant-design-vue
42
+ - naive-ui
43
+ - arco-design
44
+ - tdesign
45
+ - vant
46
+
47
+ > 如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢!本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create/issues/new)
48
+
49
+ > 开发者讨论群[629709230](https://jq.qq.com/?_wv=1027&k=F1FlEFIV)
11
50
 
12
- [开源的vue表单设计器组件](https://github.com/xaboy/form-create-designer) ([功能演示](http://form-create.com/designer?fr=fc))
13
51
 
14
52
  - **预览**
15
53
 
16
54
  ![demo1](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live3.gif)
17
55
 
56
+ ![demo2](https://form-create.com/v3/img/form-create.mobile.jpg)
57
+
58
+ <details>
59
+ <summary><b>更多</b></summary>
18
60
 
19
61
  - **操作表单**
20
62
 
63
+ [详细说明](https://www.form-create.com/v3/instance.html)
64
+
21
65
  ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live2.gif)
22
66
 
23
67
  - **`group` 组件**
24
68
 
69
+ [详细说明](https://www.form-create.com/v3/guide/group.html)
70
+
25
71
  ![demo3](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-group.gif)
26
72
 
27
73
  - **`control` 配置项**
28
74
 
75
+ [详细说明](https://www.form-create.com/v3/guide/control.html)
76
+
29
77
  ![demo2](https://raw.githubusercontent.com/xaboy/form-create/dev/images/demo-live4.gif)
78
+ </details>
79
+
80
+ ## 包说明
81
+
82
+ | 包名 | 说明 |
83
+ |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
84
+ | @form-create/element-ui [![version](https://img.shields.io/npm/v/@form-create/element-ui/next.svg)](https://www.npmjs.com/package/@form-create/element-ui) [![npm](https://img.shields.io/npm/dt/@form-create/element-ui.svg)](https://www.npmjs.com/package/@form-create/element-ui) | [element-plus 版本](http://form-create.com/v3/element-ui/) |
85
+ | @form-create/ant-design-vue [![version](https://img.shields.io/npm/v/@form-create/ant-design-vue/next.svg)](https://www.npmjs.com/package/@form-create/ant-design-vue) [![npm](https://img.shields.io/npm/dt/@form-create/ant-design-vue.svg)](https://www.npmjs.com/package/@form-create/ant-design-vue) | [ant-design-vue 版本](http://form-create.com/v3/ant-design-vue/) |
86
+ | @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
+ | @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
+ | @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/) |
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) |
91
+
92
+
93
+ ## 示例
94
+
95
+ - [在线示例](https://www.form-create.com/v3/guide/demo.html)
96
+
97
+
98
+
99
+ <details>
100
+ <summary><b>效果图</b></summary>
101
+
102
+ ![https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg](https://raw.githubusercontent.com/xaboy/form-create/dev/images/sample110.jpg)
103
+ </details>
104
+
105
+
106
+ ## 联系
107
+ ![http://static.form-create.com/file/img/support.jpg](http://static.form-create.com/file/img/support.jpg)
108
+
109
+ ## 感谢
110
+
111
+ [时光弧线](https://github.com/shiguanghuxian) | [wxxtqk](https://github.com/wxxtqk) | [williamBoss](https://github.com/williamBoss) | [HeyMrLin](https://github.com/HeyMrLin) | [djkloop](https://github.com/djkloop) | [daiwenyong](https://github.com/daiwenyong) | [JetBrains](https://www.jetbrains.com/?from=form-create)
112
+
113
+ ## License
114
+
115
+ [MIT](http://opensource.org/licenses/MIT)
30
116
 
117
+ Copyright (c) 2018-present xaboy
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @form-create/element-ui v3.2.10
2
+ * @form-create/element-ui v3.2.12
3
3
  * (c) 2018-2024 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
@@ -2141,7 +2141,7 @@ function $FormCreate(FormCreate, components, directives) {
2141
2141
  },
2142
2142
  inFor: Boolean
2143
2143
  },
2144
- emits: ['update:api', 'update:modelValue', 'mounted', 'submit', 'change', 'emit-event', 'control', 'remove-rule', 'remove-field', 'sync', 'reload', 'repeat-field', 'update', 'validate-field-fail', 'validate-fail', 'created'],
2144
+ 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'],
2145
2145
  render: function render() {
2146
2146
  return this.fc.render();
2147
2147
  },
@@ -2444,7 +2444,7 @@ var mergeFn = function mergeFn(fn1, fn2) {
2444
2444
  };
2445
2445
  };
2446
2446
 
2447
- var keyAttrs = ['type', 'slot', 'emitPrefix', 'value', 'name', 'native', 'hidden', 'display', 'inject', 'options', 'emit', 'link', 'prefix', 'suffix', 'update', 'sync', 'optionsTo', 'key', 'slotUpdate', 'computed', 'preview', 'component', 'cache', 'modelEmit'];
2447
+ var keyAttrs = ['type', 'slot', 'ignore', 'emitPrefix', 'value', 'name', 'native', 'hidden', 'display', 'inject', 'options', 'emit', 'link', 'prefix', 'suffix', 'update', 'sync', 'optionsTo', 'key', 'slotUpdate', 'computed', 'preview', 'component', 'cache', 'modelEmit'];
2448
2448
  var arrayAttrs = ['validate', 'children', 'control'];
2449
2449
  var normalAttrs = ['effect', 'deep'];
2450
2450
  function attrs() {
@@ -3072,16 +3072,32 @@ function Api(h) {
3072
3072
  },
3073
3073
 
3074
3074
  formData: function formData(fields) {
3075
- return tidyFields(fields).reduce(function (initial, id) {
3076
- var ctx = h.getFieldCtx(id);
3077
- if (!ctx) return initial;
3078
- initial[ctx.field] = copy(ctx.rule.value);
3079
- return initial;
3080
- }, h.options.appendValue !== false ? copy(h.appendData) : {});
3075
+ if (fields == null) {
3076
+ var data = {};
3077
+ Object.keys(h.form).forEach(function (k) {
3078
+ if (h.ignoreFields.indexOf(k) === -1) {
3079
+ data[k] = copy(h.form[k]);
3080
+ }
3081
+ });
3082
+ return data;
3083
+ } else {
3084
+ return tidyFields(fields).reduce(function (initial, id) {
3085
+ initial[id] = api.getValue(id);
3086
+ return initial;
3087
+ }, {});
3088
+ }
3081
3089
  },
3082
3090
  getValue: function getValue(field) {
3083
3091
  var ctx = h.getFieldCtx(field);
3084
- if (!ctx) return;
3092
+
3093
+ if (!ctx) {
3094
+ if (h.options.appendValue !== false && hasProperty(h.appendData, field)) {
3095
+ return copy(h.appendData[field]);
3096
+ }
3097
+
3098
+ return undefined;
3099
+ }
3100
+
3085
3101
  return copy(ctx.rule.value);
3086
3102
  },
3087
3103
  coverValue: function coverValue(formData) {
@@ -3389,6 +3405,13 @@ function Api(h) {
3389
3405
  nextTick(function () {
3390
3406
  api.clearValidateState();
3391
3407
  });
3408
+
3409
+ if (fields == null) {
3410
+ is.Function(h.options.onReset) && invoke(function () {
3411
+ return h.options.onReset(api);
3412
+ });
3413
+ h.vm.emit('reset', api);
3414
+ }
3392
3415
  },
3393
3416
  method: function method(id, name) {
3394
3417
  var el = api.el(id);
@@ -3965,6 +3988,9 @@ function useRender$1(Render) {
3965
3988
  getSubForm: function getSubForm() {
3966
3989
  return _this6.$handle.subForm[ctx.id];
3967
3990
  },
3991
+ slots: function slots() {
3992
+ return _this6.vm.setupState.top.slots;
3993
+ },
3968
3994
  options: [],
3969
3995
  children: [],
3970
3996
  preview: false,
@@ -5059,9 +5085,9 @@ function useLoader(Handler) {
5059
5085
  __ctrl: true,
5060
5086
  children: rule,
5061
5087
  valid: valid
5062
- }) : ctx.ctrlRule.splice(ctx.ctrlRule.indexOf(ctrl), 1);
5088
+ }) : ctrl && ctx.ctrlRule.splice(ctx.ctrlRule.indexOf(ctrl) >>> 0, 1);
5063
5089
  hideLst[valid ? 'push' : 'unshift'](function () {
5064
- if (method === 'disabled') {
5090
+ if (method === 'disabled' || method === 'enabled') {
5065
5091
  _this7.api.disabled(!valid, rule);
5066
5092
  } else if (method === 'display') {
5067
5093
  _this7.api.display(valid, rule);
@@ -5281,6 +5307,7 @@ function useInput(Handler) {
5281
5307
 
5282
5308
  var data = reactive({});
5283
5309
  var fields = this.fields();
5310
+ var ignoreFields = [];
5284
5311
 
5285
5312
  if (this.options.appendValue !== false) {
5286
5313
  Object.keys(this.appendData).reduce(function (initial, field) {
@@ -5293,14 +5320,24 @@ function useInput(Handler) {
5293
5320
  }
5294
5321
 
5295
5322
  fields.reduce(function (initial, field) {
5296
- var ctx = _this2.getCtx(field);
5323
+ var ctx = (_this2.fieldCtx[field] || []).filter(function (ctx) {
5324
+ return !_this2.isIgnore(ctx.rule);
5325
+ })[0] || _this2.fieldCtx[field][0];
5326
+
5327
+ if (_this2.isIgnore(ctx.rule)) {
5328
+ ignoreFields.push(field);
5329
+ }
5297
5330
 
5298
5331
  initial[field] = toRef(ctx.rule, 'value');
5299
5332
  return initial;
5300
5333
  }, data);
5301
5334
  this.form = data;
5335
+ this.ignoreFields = ignoreFields;
5302
5336
  this.syncValue();
5303
5337
  },
5338
+ isIgnore: function isIgnore(rule) {
5339
+ return rule.ignore || this.options.ignoreHiddenFields && rule.hidden;
5340
+ },
5304
5341
  appendValue: function appendValue(rule) {
5305
5342
  if ((!rule.field || !hasProperty(this.appendData, rule.field)) && !this.options.forceCoverValue) {
5306
5343
  return;
@@ -5332,11 +5369,19 @@ function useInput(Handler) {
5332
5369
  }
5333
5370
  },
5334
5371
  syncValue: function syncValue() {
5372
+ var _this3 = this;
5373
+
5335
5374
  if (this.deferSyncFn) {
5336
5375
  return this.deferSyncFn.sync = true;
5337
5376
  }
5338
5377
 
5339
- this.vm.setupState.updateValue(_objectSpread2({}, this.form));
5378
+ var data = {};
5379
+ Object.keys(this.form).forEach(function (k) {
5380
+ if (_this3.ignoreFields.indexOf(k) === -1) {
5381
+ data[k] = _this3.form[k];
5382
+ }
5383
+ });
5384
+ this.vm.setupState.updateValue(data);
5340
5385
  },
5341
5386
  isChange: function isChange(ctx, value) {
5342
5387
  return JSON.stringify(this.getFormData(ctx), strFn) !== JSON.stringify(value, strFn);
@@ -5345,11 +5390,11 @@ function useInput(Handler) {
5345
5390
  return (is.Object(value) || Array.isArray(value)) && value === ctx.rule.value;
5346
5391
  },
5347
5392
  refreshUpdate: function refreshUpdate(ctx, val, origin, field) {
5348
- var _this3 = this;
5393
+ var _this4 = this;
5349
5394
 
5350
5395
  if (is.Function(ctx.rule.update)) {
5351
5396
  var state = invoke(function () {
5352
- return ctx.rule.update(val, ctx.origin, _this3.api, {
5397
+ return ctx.rule.update(val, ctx.origin, _this4.api, {
5353
5398
  origin: origin || 'change',
5354
5399
  linkField: field
5355
5400
  });
@@ -5373,18 +5418,18 @@ function useInput(Handler) {
5373
5418
  this.refreshUpdate(ctx, val, origin, field);
5374
5419
  },
5375
5420
  appendLink: function appendLink(ctx) {
5376
- var _this4 = this;
5421
+ var _this5 = this;
5377
5422
 
5378
5423
  var link = ctx.rule.link;
5379
5424
  is.trueArray(link) && link.forEach(function (field) {
5380
5425
  var fn = function fn() {
5381
- return _this4.refreshRule(ctx, ctx.rule.value, 'link', field);
5426
+ return _this5.refreshRule(ctx, ctx.rule.value, 'link', field);
5382
5427
  };
5383
5428
 
5384
- _this4.bus.$on('change-' + field, fn);
5429
+ _this5.bus.$on('change-' + field, fn);
5385
5430
 
5386
5431
  ctx.linkOn.push(function () {
5387
- return _this4.bus.$off('change-' + field, fn);
5432
+ return _this5.bus.$off('change-' + field, fn);
5388
5433
  });
5389
5434
  });
5390
5435
  },
@@ -5538,7 +5583,13 @@ function useContext(Handler) {
5538
5583
 
5539
5584
  _this.watching = true;
5540
5585
 
5541
- if (key === 'link') {
5586
+ if (key === 'hidden' && Boolean(n) !== Boolean(o)) {
5587
+ _this.$render.clearCacheAll();
5588
+ }
5589
+
5590
+ if (key === 'ignore' && ctx.input || key === 'hidden' && ctx.input && _this.options.ignoreHiddenFields) {
5591
+ _this.syncForm();
5592
+ } else if (key === 'link') {
5542
5593
  ctx.link();
5543
5594
  return;
5544
5595
  } else if (['props', 'on', 'deep'].indexOf(key) > -1) {
@@ -5549,8 +5600,6 @@ function useContext(Handler) {
5549
5600
  }
5550
5601
  } else if (key === 'emit') {
5551
5602
  _this.parseEmit(ctx);
5552
- } else if (key === 'hidden' && Boolean(n) !== Boolean(o)) {
5553
- _this.$render.clearCacheAll();
5554
5603
  } else if (['prefix', 'suffix'].indexOf(key) > -1) n && _this.loadFn(n, ctx.rule);else if (key === 'type') {
5555
5604
  ctx.updateType();
5556
5605
 
@@ -5605,10 +5654,18 @@ function useContext(Handler) {
5605
5654
  }
5606
5655
 
5607
5656
  Object.keys(computedRule).forEach(function (k) {
5657
+ var oldValue = undefined;
5608
5658
  var computedValue = computed(function () {
5609
5659
  var item = computedRule[k];
5610
5660
  if (!item) return undefined;
5611
- return _this.compute(ctx, item);
5661
+
5662
+ var value = _this.compute(ctx, item);
5663
+
5664
+ if (item.linkage && value === undefined) {
5665
+ return oldValue;
5666
+ }
5667
+
5668
+ return value;
5612
5669
  });
5613
5670
 
5614
5671
  var callback = function callback(n) {
@@ -5626,6 +5683,7 @@ function useContext(Handler) {
5626
5683
  }
5627
5684
 
5628
5685
  ctx.watch.push(watch(computedValue, function (n) {
5686
+ oldValue = n;
5629
5687
  setTimeout(function () {
5630
5688
  callback(n);
5631
5689
  });
@@ -5680,41 +5738,51 @@ function useContext(Handler) {
5680
5738
  };
5681
5739
 
5682
5740
  var val = checkCondition(item);
5683
- return item.invert === true ? !val : val;
5741
+ val = item.invert === true ? !val : val;
5742
+
5743
+ if (item.linkage) {
5744
+ return val ? invoke(function () {
5745
+ return _this2.computeValue(item.linkage, ctx, group);
5746
+ }, undefined) : undefined;
5747
+ }
5748
+
5749
+ return val;
5684
5750
  } else if (is.Function(item)) {
5685
5751
  fn = function fn() {
5686
5752
  return item(_this2.api.form, _this2.api);
5687
5753
  };
5688
5754
  } else {
5689
- var that = this;
5690
- var formulas = Object.keys(this.fc.formulas).reduce(function (obj, k) {
5691
- obj[k] = function () {
5692
- var _that$fc$formulas$k;
5693
-
5694
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5695
- args[_key] = arguments[_key];
5696
- }
5697
-
5698
- return (_that$fc$formulas$k = that.fc.formulas[k]).call.apply(_that$fc$formulas$k, [{
5699
- that: this,
5700
- rule: ctx.rule,
5701
- api: that.api,
5702
- fc: that.fc
5703
- }].concat(args));
5704
- };
5705
-
5706
- return obj;
5707
- }, {});
5708
-
5709
5755
  var _group = ctx.getParentGroup();
5710
5756
 
5711
5757
  fn = function fn() {
5712
- return new Function('$formulas', '$form', '$group', '$rule', '$api', "with($form){with(this){with($group){with($formulas){ return ".concat(item, " }}}}")).call(_this2.api.form, formulas, _this2.api.top.form, _group ? _this2.subRuleData[_group.id] || {} : {}, ctx.rule, _this2.api);
5758
+ return _this2.computeValue(item, ctx, _group);
5713
5759
  };
5714
5760
  }
5715
5761
 
5716
5762
  return invoke(fn, undefined);
5717
5763
  },
5764
+ computeValue: function computeValue(str, ctx, group) {
5765
+ var that = this;
5766
+ var formulas = Object.keys(this.fc.formulas).reduce(function (obj, k) {
5767
+ obj[k] = function () {
5768
+ var _that$fc$formulas$k;
5769
+
5770
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5771
+ args[_key] = arguments[_key];
5772
+ }
5773
+
5774
+ return (_that$fc$formulas$k = that.fc.formulas[k]).call.apply(_that$fc$formulas$k, [{
5775
+ that: this,
5776
+ rule: ctx.rule,
5777
+ api: that.api,
5778
+ fc: that.fc
5779
+ }].concat(args));
5780
+ };
5781
+
5782
+ return obj;
5783
+ }, {});
5784
+ return new Function('$formulas', '$form', '$group', '$rule', '$api', "with($form){with(this){with($group){with($formulas){ return ".concat(str, " }}}}")).call(this.api.form, formulas, this.api.top.form, group ? this.subRuleData[group.id] || {} : {}, ctx.rule, this.api);
5785
+ },
5718
5786
  updateChildren: function updateChildren(ctx, n, o) {
5719
5787
  var _this3 = this;
5720
5788
 
@@ -6037,6 +6105,7 @@ function Handler(fc) {
6037
6105
  subForm: {},
6038
6106
  form: reactive({}),
6039
6107
  appendData: {},
6108
+ ignoreFields: [],
6040
6109
  providers: {},
6041
6110
  cycleLoad: null,
6042
6111
  loadedId: 1,
@@ -6696,6 +6765,7 @@ function FormCreateFactory(config) {
6696
6765
  var CreateNode = CreateNodeFactory();
6697
6766
  var formulas = {};
6698
6767
  var isMobile = config.isMobile === true;
6768
+ var prototype = {};
6699
6769
  exportAttrs(config.attrs || {});
6700
6770
 
6701
6771
  function getApi(name) {
@@ -6810,6 +6880,8 @@ function FormCreateFactory(config) {
6810
6880
  return vm.$refs.fc.fapi;
6811
6881
  }
6812
6882
 
6883
+ setPrototypeOf(create, prototype);
6884
+
6813
6885
  function factory(inherit) {
6814
6886
  var _config = _objectSpread2({}, config);
6815
6887
 
@@ -7157,9 +7229,9 @@ function FormCreateFactory(config) {
7157
7229
  var split = id.split('.');
7158
7230
  var key = split.shift();
7159
7231
 
7160
- if (key === '$form') {
7232
+ if (key === '$topForm') {
7161
7233
  val = this.$handle.api.top.formData();
7162
- } else if (key === '$subForm') {
7234
+ } else if (key === '$form') {
7163
7235
  val = this.$handle.api.formData();
7164
7236
  } else if (key === '$options') {
7165
7237
  val = this.options.value;
@@ -7171,7 +7243,7 @@ function FormCreateFactory(config) {
7171
7243
  split = [];
7172
7244
  } else {
7173
7245
  var tmpData = this.vm.setupState.top.setupState.fc.tmpData;
7174
- val = hasProperty(tmpData, key) ? deepGet(tmpData, id) : getData(key);
7246
+ val = hasProperty(tmpData, key) ? deepGet(tmpData, id) : getData(id);
7175
7247
  split = [];
7176
7248
  }
7177
7249
 
@@ -7206,7 +7278,9 @@ function FormCreateFactory(config) {
7206
7278
  var callback = debounce(function () {
7207
7279
  var temp = _this6.getLoadData(id, def);
7208
7280
 
7209
- if (JSON.stringify(temp) !== JSON.stringify(unwatch[id].val)) {
7281
+ if (!unwatch[id]) {
7282
+ return;
7283
+ } else if (JSON.stringify(temp) !== JSON.stringify(unwatch[id].val)) {
7210
7284
  unwatch[id].val = temp;
7211
7285
  run(true);
7212
7286
  }
@@ -7327,6 +7401,7 @@ function FormCreateFactory(config) {
7327
7401
  extend(formCreate, {
7328
7402
  version: config.version,
7329
7403
  ui: config.ui,
7404
+ isMobile: isMobile,
7330
7405
  extendApi: extendApi,
7331
7406
  getData: getData,
7332
7407
  setDataDriver: setDataDriver,
@@ -7347,6 +7422,7 @@ function FormCreateFactory(config) {
7347
7422
  componentAlias: componentAlias,
7348
7423
  copyRule: copyRule,
7349
7424
  copyRules: copyRules,
7425
+ mergeRule: mergeRule,
7350
7426
  fetch: fetch$1,
7351
7427
  $form: $form,
7352
7428
  parseFn: parseFn,
@@ -7361,7 +7437,6 @@ function FormCreateFactory(config) {
7361
7437
  function useStatic(formCreate) {
7362
7438
  extend(formCreate, {
7363
7439
  create: create,
7364
- isMobile: isMobile,
7365
7440
  install: function install(app, options) {
7366
7441
  globalConfig = _objectSpread2(_objectSpread2({}, globalConfig), options || {});
7367
7442
  var key = '_installedFormCreate_' + config.ui;
@@ -7386,8 +7461,8 @@ function FormCreateFactory(config) {
7386
7461
  });
7387
7462
  }
7388
7463
 
7389
- useAttr(create);
7390
- useStatic(create);
7464
+ useAttr(prototype);
7465
+ useStatic(prototype);
7391
7466
  setDataDriver('$cookie', cookieDriver);
7392
7467
  setDataDriver('$localStorage', localStorageDriver);
7393
7468
  CreateNode.use({
@@ -7415,18 +7490,18 @@ function FormCreateFactory(config) {
7415
7490
  }
7416
7491
 
7417
7492
  var FcComponent = $form();
7418
- setPrototypeOf(FcComponent, create);
7493
+ setPrototypeOf(FcComponent, prototype);
7419
7494
  Object.defineProperties(FcComponent, {
7420
7495
  fetch: {
7421
7496
  get: function get() {
7422
- return create.fetch;
7497
+ return prototype.fetch;
7423
7498
  },
7424
7499
  set: function set(val) {
7425
- create.fetch = val;
7500
+ prototype.fetch = val;
7426
7501
  }
7427
7502
  }
7428
7503
  });
7429
- FcComponent.util = create;
7504
+ FcComponent.util = prototype;
7430
7505
  return FcComponent;
7431
7506
  }
7432
7507
 
@@ -8311,7 +8386,7 @@ function install(FormCreate) {
8311
8386
  function elmFormCreate() {
8312
8387
  return FormCreateFactory({
8313
8388
  ui: 'element-ui',
8314
- version: '3.2.10',
8389
+ version: '3.2.12',
8315
8390
  manager: manager,
8316
8391
  extendApi: extendApi,
8317
8392
  install: install,