@form-create/element-ui 3.2.9 → 3.2.11
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 +95 -8
- package/dist/form-create.esm.js +132 -38
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +132 -38
- package/dist/form-create.min.js +2 -2
- package/package.json +8 -7
- package/src/core/manager.js +1 -1
package/README.md
CHANGED
|
@@ -1,30 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://www.form-create.com/" target="_blank">官网</a>
|
|
12
|
+
<span> | </span>
|
|
13
|
+
<a href="https://form-create.com/v3/guide/" target="_blank">帮助文档</a>
|
|
14
|
+
<span> | </span>
|
|
15
|
+
<a href="https://pro.form-create.com/view/" target="_blank">可视化表单设计器</a>
|
|
16
|
+
<span> | </span>
|
|
17
|
+
<a href="https://pro.form-create.com/mobile/" target="_blank">移动端表单设计器</a>
|
|
18
|
+
</p>
|
|
5
19
|
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
|
|
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
|
-
|
|
25
|
+
**FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。**
|
|
26
|
+
|
|
27
|
+
[](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
|

|
|
17
55
|
|
|
56
|
+

|
|
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
|

|
|
22
66
|
|
|
23
67
|
- **`group` 组件**
|
|
24
68
|
|
|
69
|
+
[详细说明](https://www.form-create.com/v3/guide/group.html)
|
|
70
|
+
|
|
25
71
|

|
|
26
72
|
|
|
27
73
|
- **`control` 配置项**
|
|
28
74
|
|
|
75
|
+
[详细说明](https://www.form-create.com/v3/guide/control.html)
|
|
76
|
+
|
|
29
77
|

|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
## 包说明
|
|
81
|
+
|
|
82
|
+
| 包名 | 说明 |
|
|
83
|
+
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
|
|
84
|
+
| @form-create/element-ui [](https://www.npmjs.com/package/@form-create/element-ui) [](https://www.npmjs.com/package/@form-create/element-ui) | [element-plus 版本](http://form-create.com/v3/element-ui/) |
|
|
85
|
+
| @form-create/ant-design-vue [](https://www.npmjs.com/package/@form-create/ant-design-vue) [](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 [](https://www.npmjs.com/package/@form-create/arco-design) [](https://www.npmjs.com/package/@form-create/arco-design) | [arco-design 版本](http://form-create.com/v3/arco-design/) |
|
|
87
|
+
| @form-create/naive-ui [](https://www.npmjs.com/package/@form-create/naive-ui) [](https://www.npmjs.com/package/@form-create/naive-ui) | [naive-ui 版本](http://form-create.com/v3/naive-ui/) |
|
|
88
|
+
| @form-create/tdesign [](https://www.npmjs.com/package/@form-create/tdesign) [](https://www.npmjs.com/package/@form-create/tdesign) | [tdesign 版本](http://form-create.com/v3/tdesign/) |
|
|
89
|
+
| @form-create/vant [](https://www.npmjs.com/package/@form-create/vant) [](https://www.npmjs.com/package/@form-create/vant) | [vant 版本(移动端)](http://form-create.com/v3/vant/) |
|
|
90
|
+
| @form-create/designer [](https://www.npmjs.com/package/@form-create/designer) [](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
|
+

|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## 联系
|
|
107
|
+

|
|
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
|
package/dist/form-create.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.2.
|
|
2
|
+
* @form-create/element-ui v3.2.11
|
|
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,33 @@ function Api(h) {
|
|
|
3072
3072
|
},
|
|
3073
3073
|
|
|
3074
3074
|
formData: function formData(fields) {
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3075
|
+
if (fields == null) {
|
|
3076
|
+
return api.fields().reduce(function (initial, id) {
|
|
3077
|
+
var ctx = (h.fieldCtx[id] || []).filter(function (ctx) {
|
|
3078
|
+
return !h.isIgnore(ctx.rule);
|
|
3079
|
+
})[0];
|
|
3080
|
+
if (!ctx) return initial;
|
|
3081
|
+
initial[ctx.field] = copy(ctx.rule.value);
|
|
3082
|
+
return initial;
|
|
3083
|
+
}, h.options.appendValue !== false ? copy(h.appendData) : {});
|
|
3084
|
+
} else {
|
|
3085
|
+
return tidyFields(fields).reduce(function (initial, id) {
|
|
3086
|
+
initial[id] = api.getValue(id);
|
|
3087
|
+
return initial;
|
|
3088
|
+
}, {});
|
|
3089
|
+
}
|
|
3081
3090
|
},
|
|
3082
3091
|
getValue: function getValue(field) {
|
|
3083
3092
|
var ctx = h.getFieldCtx(field);
|
|
3084
|
-
|
|
3093
|
+
|
|
3094
|
+
if (!ctx) {
|
|
3095
|
+
if (h.options.appendValue !== false && hasProperty(h.appendData, field)) {
|
|
3096
|
+
return copy(h.appendData[field]);
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
return undefined;
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3085
3102
|
return copy(ctx.rule.value);
|
|
3086
3103
|
},
|
|
3087
3104
|
coverValue: function coverValue(formData) {
|
|
@@ -3389,6 +3406,13 @@ function Api(h) {
|
|
|
3389
3406
|
nextTick(function () {
|
|
3390
3407
|
api.clearValidateState();
|
|
3391
3408
|
});
|
|
3409
|
+
|
|
3410
|
+
if (fields == null) {
|
|
3411
|
+
is.Function(h.options.onReset) && invoke(function () {
|
|
3412
|
+
return h.options.onReset(api);
|
|
3413
|
+
});
|
|
3414
|
+
h.vm.emit('reset', api);
|
|
3415
|
+
}
|
|
3392
3416
|
},
|
|
3393
3417
|
method: function method(id, name) {
|
|
3394
3418
|
var el = api.el(id);
|
|
@@ -3549,7 +3573,17 @@ function Api(h) {
|
|
|
3549
3573
|
opt = deepCopy(opt);
|
|
3550
3574
|
opt = h.loadFetchVar(opt);
|
|
3551
3575
|
h.beforeFetch(opt).then(function () {
|
|
3552
|
-
return asyncFetch(opt, h.fc.create.fetch).then(
|
|
3576
|
+
return asyncFetch(opt, h.fc.create.fetch).then(function (res) {
|
|
3577
|
+
invoke(function () {
|
|
3578
|
+
return opt.onSuccess && opt.onSuccess(res);
|
|
3579
|
+
});
|
|
3580
|
+
resolve(res);
|
|
3581
|
+
})["catch"](function (e) {
|
|
3582
|
+
invoke(function () {
|
|
3583
|
+
return opt.onError && opt.onError(e);
|
|
3584
|
+
});
|
|
3585
|
+
reject(e);
|
|
3586
|
+
});
|
|
3553
3587
|
});
|
|
3554
3588
|
});
|
|
3555
3589
|
},
|
|
@@ -3560,8 +3594,14 @@ function Api(h) {
|
|
|
3560
3594
|
_opt = h.loadFetchVar(_opt, get);
|
|
3561
3595
|
h.beforeFetch(_opt).then(function () {
|
|
3562
3596
|
return asyncFetch(_opt, h.fc.create.fetch).then(function (res) {
|
|
3597
|
+
invoke(function () {
|
|
3598
|
+
return _opt.onSuccess && _opt.onSuccess(res);
|
|
3599
|
+
});
|
|
3563
3600
|
callback && callback(res, change);
|
|
3564
3601
|
})["catch"](function (e) {
|
|
3602
|
+
invoke(function () {
|
|
3603
|
+
return _opt.onError && _opt.onError(e);
|
|
3604
|
+
});
|
|
3565
3605
|
error && error(e);
|
|
3566
3606
|
});
|
|
3567
3607
|
});
|
|
@@ -3949,6 +3989,9 @@ function useRender$1(Render) {
|
|
|
3949
3989
|
getSubForm: function getSubForm() {
|
|
3950
3990
|
return _this6.$handle.subForm[ctx.id];
|
|
3951
3991
|
},
|
|
3992
|
+
slots: function slots() {
|
|
3993
|
+
return _this6.vm.setupState.top.slots;
|
|
3994
|
+
},
|
|
3952
3995
|
options: [],
|
|
3953
3996
|
children: [],
|
|
3954
3997
|
preview: false,
|
|
@@ -5279,12 +5322,18 @@ function useInput(Handler) {
|
|
|
5279
5322
|
fields.reduce(function (initial, field) {
|
|
5280
5323
|
var ctx = _this2.getCtx(field);
|
|
5281
5324
|
|
|
5282
|
-
|
|
5325
|
+
if (!_this2.isIgnore(ctx.rule)) {
|
|
5326
|
+
initial[field] = toRef(ctx.rule, 'value');
|
|
5327
|
+
}
|
|
5328
|
+
|
|
5283
5329
|
return initial;
|
|
5284
5330
|
}, data);
|
|
5285
5331
|
this.form = data;
|
|
5286
5332
|
this.syncValue();
|
|
5287
5333
|
},
|
|
5334
|
+
isIgnore: function isIgnore(rule) {
|
|
5335
|
+
return rule.ignore || this.options.ignoreHiddenFields && rule.hidden;
|
|
5336
|
+
},
|
|
5288
5337
|
appendValue: function appendValue(rule) {
|
|
5289
5338
|
if ((!rule.field || !hasProperty(this.appendData, rule.field)) && !this.options.forceCoverValue) {
|
|
5290
5339
|
return;
|
|
@@ -5522,7 +5571,13 @@ function useContext(Handler) {
|
|
|
5522
5571
|
|
|
5523
5572
|
_this.watching = true;
|
|
5524
5573
|
|
|
5525
|
-
if (key === '
|
|
5574
|
+
if (key === 'hidden' && Boolean(n) !== Boolean(o)) {
|
|
5575
|
+
_this.$render.clearCacheAll();
|
|
5576
|
+
}
|
|
5577
|
+
|
|
5578
|
+
if (key === 'ignore' && ctx.input || key === 'hidden' && ctx.input && _this.options.ignoreHiddenFields) {
|
|
5579
|
+
_this.syncForm();
|
|
5580
|
+
} else if (key === 'link') {
|
|
5526
5581
|
ctx.link();
|
|
5527
5582
|
return;
|
|
5528
5583
|
} else if (['props', 'on', 'deep'].indexOf(key) > -1) {
|
|
@@ -5533,8 +5588,6 @@ function useContext(Handler) {
|
|
|
5533
5588
|
}
|
|
5534
5589
|
} else if (key === 'emit') {
|
|
5535
5590
|
_this.parseEmit(ctx);
|
|
5536
|
-
} else if (key === 'hidden' && Boolean(n) !== Boolean(o)) {
|
|
5537
|
-
_this.$render.clearCacheAll();
|
|
5538
5591
|
} else if (['prefix', 'suffix'].indexOf(key) > -1) n && _this.loadFn(n, ctx.rule);else if (key === 'type') {
|
|
5539
5592
|
ctx.updateType();
|
|
5540
5593
|
|
|
@@ -5589,10 +5642,18 @@ function useContext(Handler) {
|
|
|
5589
5642
|
}
|
|
5590
5643
|
|
|
5591
5644
|
Object.keys(computedRule).forEach(function (k) {
|
|
5645
|
+
var oldValue = undefined;
|
|
5592
5646
|
var computedValue = computed(function () {
|
|
5593
5647
|
var item = computedRule[k];
|
|
5594
5648
|
if (!item) return undefined;
|
|
5595
|
-
|
|
5649
|
+
|
|
5650
|
+
var value = _this.compute(ctx, item);
|
|
5651
|
+
|
|
5652
|
+
if (item.linkage && value === undefined) {
|
|
5653
|
+
return oldValue;
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
return value;
|
|
5596
5657
|
});
|
|
5597
5658
|
|
|
5598
5659
|
var callback = function callback(n) {
|
|
@@ -5610,6 +5671,7 @@ function useContext(Handler) {
|
|
|
5610
5671
|
}
|
|
5611
5672
|
|
|
5612
5673
|
ctx.watch.push(watch(computedValue, function (n) {
|
|
5674
|
+
oldValue = n;
|
|
5613
5675
|
setTimeout(function () {
|
|
5614
5676
|
callback(n);
|
|
5615
5677
|
});
|
|
@@ -5664,7 +5726,15 @@ function useContext(Handler) {
|
|
|
5664
5726
|
};
|
|
5665
5727
|
|
|
5666
5728
|
var val = checkCondition(item);
|
|
5667
|
-
|
|
5729
|
+
val = item.invert === true ? !val : val;
|
|
5730
|
+
|
|
5731
|
+
if (item.linkage) {
|
|
5732
|
+
return val ? invoke(function () {
|
|
5733
|
+
return _this2.computeValue(item.linkage, ctx, group);
|
|
5734
|
+
}, undefined) : undefined;
|
|
5735
|
+
}
|
|
5736
|
+
|
|
5737
|
+
return val;
|
|
5668
5738
|
} else if (is.Function(item)) {
|
|
5669
5739
|
fn = function fn() {
|
|
5670
5740
|
return item(_this2.api.form, _this2.api);
|
|
@@ -5673,12 +5743,34 @@ function useContext(Handler) {
|
|
|
5673
5743
|
var _group = ctx.getParentGroup();
|
|
5674
5744
|
|
|
5675
5745
|
fn = function fn() {
|
|
5676
|
-
return
|
|
5746
|
+
return _this2.computeValue(item, ctx, _group);
|
|
5677
5747
|
};
|
|
5678
5748
|
}
|
|
5679
5749
|
|
|
5680
5750
|
return invoke(fn, undefined);
|
|
5681
5751
|
},
|
|
5752
|
+
computeValue: function computeValue(str, ctx, group) {
|
|
5753
|
+
var that = this;
|
|
5754
|
+
var formulas = Object.keys(this.fc.formulas).reduce(function (obj, k) {
|
|
5755
|
+
obj[k] = function () {
|
|
5756
|
+
var _that$fc$formulas$k;
|
|
5757
|
+
|
|
5758
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5759
|
+
args[_key] = arguments[_key];
|
|
5760
|
+
}
|
|
5761
|
+
|
|
5762
|
+
return (_that$fc$formulas$k = that.fc.formulas[k]).call.apply(_that$fc$formulas$k, [{
|
|
5763
|
+
that: this,
|
|
5764
|
+
rule: ctx.rule,
|
|
5765
|
+
api: that.api,
|
|
5766
|
+
fc: that.fc
|
|
5767
|
+
}].concat(args));
|
|
5768
|
+
};
|
|
5769
|
+
|
|
5770
|
+
return obj;
|
|
5771
|
+
}, {});
|
|
5772
|
+
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);
|
|
5773
|
+
},
|
|
5682
5774
|
updateChildren: function updateChildren(ctx, n, o) {
|
|
5683
5775
|
var _this3 = this;
|
|
5684
5776
|
|
|
@@ -5984,7 +6076,7 @@ function Handler(fc) {
|
|
|
5984
6076
|
return fc.bus;
|
|
5985
6077
|
},
|
|
5986
6078
|
preview: function preview() {
|
|
5987
|
-
return fc.vm.props.preview != null ? fc.vm.props.preview :
|
|
6079
|
+
return fc.vm.props.preview != null ? fc.vm.props.preview : fc.options.value.preview || false;
|
|
5988
6080
|
}
|
|
5989
6081
|
});
|
|
5990
6082
|
extend(this, {
|
|
@@ -6660,6 +6752,7 @@ function FormCreateFactory(config) {
|
|
|
6660
6752
|
var CreateNode = CreateNodeFactory();
|
|
6661
6753
|
var formulas = {};
|
|
6662
6754
|
var isMobile = config.isMobile === true;
|
|
6755
|
+
var prototype = {};
|
|
6663
6756
|
exportAttrs(config.attrs || {});
|
|
6664
6757
|
|
|
6665
6758
|
function getApi(name) {
|
|
@@ -6774,6 +6867,8 @@ function FormCreateFactory(config) {
|
|
|
6774
6867
|
return vm.$refs.fc.fapi;
|
|
6775
6868
|
}
|
|
6776
6869
|
|
|
6870
|
+
setPrototypeOf(create, prototype);
|
|
6871
|
+
|
|
6777
6872
|
function factory(inherit) {
|
|
6778
6873
|
var _config = _objectSpread2({}, config);
|
|
6779
6874
|
|
|
@@ -7121,9 +7216,9 @@ function FormCreateFactory(config) {
|
|
|
7121
7216
|
var split = id.split('.');
|
|
7122
7217
|
var key = split.shift();
|
|
7123
7218
|
|
|
7124
|
-
if (key === '$
|
|
7219
|
+
if (key === '$topForm') {
|
|
7125
7220
|
val = this.$handle.api.top.formData();
|
|
7126
|
-
} else if (key === '$
|
|
7221
|
+
} else if (key === '$form') {
|
|
7127
7222
|
val = this.$handle.api.formData();
|
|
7128
7223
|
} else if (key === '$options') {
|
|
7129
7224
|
val = this.options.value;
|
|
@@ -7135,7 +7230,7 @@ function FormCreateFactory(config) {
|
|
|
7135
7230
|
split = [];
|
|
7136
7231
|
} else {
|
|
7137
7232
|
var tmpData = this.vm.setupState.top.setupState.fc.tmpData;
|
|
7138
|
-
val = hasProperty(tmpData, key) ? deepGet(tmpData, id) : getData(
|
|
7233
|
+
val = hasProperty(tmpData, key) ? deepGet(tmpData, id) : getData(id);
|
|
7139
7234
|
split = [];
|
|
7140
7235
|
}
|
|
7141
7236
|
|
|
@@ -7168,14 +7263,12 @@ function FormCreateFactory(config) {
|
|
|
7168
7263
|
var key = split.shift();
|
|
7169
7264
|
var key2 = split.shift() || '';
|
|
7170
7265
|
var callback = debounce(function () {
|
|
7171
|
-
|
|
7172
|
-
var temp = _this6.getLoadData(id, def);
|
|
7266
|
+
var temp = _this6.getLoadData(id, def);
|
|
7173
7267
|
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
} else {
|
|
7268
|
+
if (!unwatch[id]) {
|
|
7269
|
+
return;
|
|
7270
|
+
} else if (JSON.stringify(temp) !== JSON.stringify(unwatch[id].val)) {
|
|
7271
|
+
unwatch[id].val = temp;
|
|
7179
7272
|
run(true);
|
|
7180
7273
|
}
|
|
7181
7274
|
}, 0);
|
|
@@ -7295,6 +7388,7 @@ function FormCreateFactory(config) {
|
|
|
7295
7388
|
extend(formCreate, {
|
|
7296
7389
|
version: config.version,
|
|
7297
7390
|
ui: config.ui,
|
|
7391
|
+
isMobile: isMobile,
|
|
7298
7392
|
extendApi: extendApi,
|
|
7299
7393
|
getData: getData,
|
|
7300
7394
|
setDataDriver: setDataDriver,
|
|
@@ -7315,6 +7409,7 @@ function FormCreateFactory(config) {
|
|
|
7315
7409
|
componentAlias: componentAlias,
|
|
7316
7410
|
copyRule: copyRule,
|
|
7317
7411
|
copyRules: copyRules,
|
|
7412
|
+
mergeRule: mergeRule,
|
|
7318
7413
|
fetch: fetch$1,
|
|
7319
7414
|
$form: $form,
|
|
7320
7415
|
parseFn: parseFn,
|
|
@@ -7329,7 +7424,6 @@ function FormCreateFactory(config) {
|
|
|
7329
7424
|
function useStatic(formCreate) {
|
|
7330
7425
|
extend(formCreate, {
|
|
7331
7426
|
create: create,
|
|
7332
|
-
isMobile: isMobile,
|
|
7333
7427
|
install: function install(app, options) {
|
|
7334
7428
|
globalConfig = _objectSpread2(_objectSpread2({}, globalConfig), options || {});
|
|
7335
7429
|
var key = '_installedFormCreate_' + config.ui;
|
|
@@ -7354,8 +7448,8 @@ function FormCreateFactory(config) {
|
|
|
7354
7448
|
});
|
|
7355
7449
|
}
|
|
7356
7450
|
|
|
7357
|
-
useAttr(
|
|
7358
|
-
useStatic(
|
|
7451
|
+
useAttr(prototype);
|
|
7452
|
+
useStatic(prototype);
|
|
7359
7453
|
setDataDriver('$cookie', cookieDriver);
|
|
7360
7454
|
setDataDriver('$localStorage', localStorageDriver);
|
|
7361
7455
|
CreateNode.use({
|
|
@@ -7383,18 +7477,18 @@ function FormCreateFactory(config) {
|
|
|
7383
7477
|
}
|
|
7384
7478
|
|
|
7385
7479
|
var FcComponent = $form();
|
|
7386
|
-
setPrototypeOf(FcComponent,
|
|
7480
|
+
setPrototypeOf(FcComponent, prototype);
|
|
7387
7481
|
Object.defineProperties(FcComponent, {
|
|
7388
7482
|
fetch: {
|
|
7389
7483
|
get: function get() {
|
|
7390
|
-
return
|
|
7484
|
+
return prototype.fetch;
|
|
7391
7485
|
},
|
|
7392
7486
|
set: function set(val) {
|
|
7393
|
-
|
|
7487
|
+
prototype.fetch = val;
|
|
7394
7488
|
}
|
|
7395
7489
|
}
|
|
7396
7490
|
});
|
|
7397
|
-
FcComponent.util =
|
|
7491
|
+
FcComponent.util = prototype;
|
|
7398
7492
|
return FcComponent;
|
|
7399
7493
|
}
|
|
7400
7494
|
|
|
@@ -7730,7 +7824,7 @@ var manager = {
|
|
|
7730
7824
|
ref: ref
|
|
7731
7825
|
});
|
|
7732
7826
|
extend(this.rule.props, {
|
|
7733
|
-
model: $handle.formData
|
|
7827
|
+
model: _objectSpread2({}, $handle.formData)
|
|
7734
7828
|
});
|
|
7735
7829
|
},
|
|
7736
7830
|
render: function render(children) {
|
|
@@ -8279,7 +8373,7 @@ function install(FormCreate) {
|
|
|
8279
8373
|
function elmFormCreate() {
|
|
8280
8374
|
return FormCreateFactory({
|
|
8281
8375
|
ui: 'element-ui',
|
|
8282
|
-
version: '3.2.
|
|
8376
|
+
version: '3.2.11',
|
|
8283
8377
|
manager: manager,
|
|
8284
8378
|
extendApi: extendApi,
|
|
8285
8379
|
install: install,
|