@form-create/element-ui 3.1.7 → 3.1.10
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/dist/form-create.esm.js +32 -16
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +32 -16
- package/dist/form-create.min.js +2 -2
- package/package.json +7 -7
package/dist/form-create.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.1.
|
|
2
|
+
* @form-create/element-ui v3.1.10
|
|
3
3
|
* (c) 2018-2022 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -255,7 +255,7 @@ var Checkbox = defineComponent({
|
|
|
255
255
|
delete props.value;
|
|
256
256
|
return createVNode(Type, mergeProps$1(props, {
|
|
257
257
|
"label": value,
|
|
258
|
-
"key": name + index + opt.value
|
|
258
|
+
"key": name + index + '-' + opt.value
|
|
259
259
|
}), {
|
|
260
260
|
"default": function _default() {
|
|
261
261
|
return [props.label || props.value || ''];
|
|
@@ -992,7 +992,7 @@ var Radio = defineComponent({
|
|
|
992
992
|
delete props.value;
|
|
993
993
|
return createVNode(Type, mergeProps$1(props, {
|
|
994
994
|
"label": value,
|
|
995
|
-
"key": name + index + opt.value
|
|
995
|
+
"key": name + index + '-' + opt.value
|
|
996
996
|
}), {
|
|
997
997
|
"default": function _default() {
|
|
998
998
|
return [props.label || props.value || ''];
|
|
@@ -1044,7 +1044,7 @@ var Select = defineComponent({
|
|
|
1044
1044
|
"default": function _default() {
|
|
1045
1045
|
return [_this.options().map(function (props, index) {
|
|
1046
1046
|
return createVNode(resolveComponent("ElOption"), mergeProps$1(props, {
|
|
1047
|
-
"key": '' + index + props.value
|
|
1047
|
+
"key": '' + index + '-' + props.value
|
|
1048
1048
|
}), null);
|
|
1049
1049
|
}), (_this$$slots$default = (_this$$slots = _this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)];
|
|
1050
1050
|
}
|
|
@@ -1502,14 +1502,22 @@ var Group = defineComponent({
|
|
|
1502
1502
|
Object.keys(this.cacheRule).forEach(function (v) {
|
|
1503
1503
|
var item = _this.cacheRule[v];
|
|
1504
1504
|
|
|
1505
|
-
if (
|
|
1506
|
-
deepExtend(item.rule, n);
|
|
1507
|
-
} else {
|
|
1505
|
+
if (item.$f) {
|
|
1508
1506
|
var val = item.$f.formData();
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1507
|
+
|
|
1508
|
+
if (n === o) {
|
|
1509
|
+
item.$f.deferSyncValue(function () {
|
|
1510
|
+
deepExtend(item.rule, n);
|
|
1511
|
+
item.$f.setValue(val);
|
|
1512
|
+
}, true);
|
|
1513
|
+
} else {
|
|
1514
|
+
var _val = item.$f.formData();
|
|
1515
|
+
|
|
1516
|
+
item.$f.once('reloading', function () {
|
|
1517
|
+
item.$f.setValue(_val);
|
|
1518
|
+
});
|
|
1519
|
+
item.rule = deepCopy(n);
|
|
1520
|
+
}
|
|
1513
1521
|
}
|
|
1514
1522
|
});
|
|
1515
1523
|
},
|
|
@@ -2831,7 +2839,6 @@ function Api(h) {
|
|
|
2831
2839
|
h.getCtxs(field).forEach(function (ctx) {
|
|
2832
2840
|
h.$render.clearCache(ctx);
|
|
2833
2841
|
ctx.rule.value = copy(ctx.defaultValue);
|
|
2834
|
-
h.refreshControl(ctx);
|
|
2835
2842
|
});
|
|
2836
2843
|
});
|
|
2837
2844
|
},
|
|
@@ -2882,6 +2889,9 @@ function Api(h) {
|
|
|
2882
2889
|
h.nextRefresh();
|
|
2883
2890
|
fn && invoke(fn);
|
|
2884
2891
|
},
|
|
2892
|
+
deferSyncValue: function deferSyncValue(fn, sync) {
|
|
2893
|
+
h.deferSyncValue(fn, sync);
|
|
2894
|
+
},
|
|
2885
2895
|
emit: function emit(name) {
|
|
2886
2896
|
var _h$vm;
|
|
2887
2897
|
|
|
@@ -3173,7 +3183,9 @@ function useRender$1(Render) {
|
|
|
3173
3183
|
}
|
|
3174
3184
|
|
|
3175
3185
|
return function () {
|
|
3176
|
-
|
|
3186
|
+
var cache = _this4.getCache(ctx);
|
|
3187
|
+
|
|
3188
|
+
return cache && cache.apply(void 0, arguments);
|
|
3177
3189
|
};
|
|
3178
3190
|
} catch (e) {
|
|
3179
3191
|
console.error(e);
|
|
@@ -3181,7 +3193,7 @@ function useRender$1(Render) {
|
|
|
3181
3193
|
}
|
|
3182
3194
|
},
|
|
3183
3195
|
getModelField: function getModelField(ctx) {
|
|
3184
|
-
return ctx.rule.modelField || ctx.parser.modelField || this.fc.modelFields[this.vNode.aliasMap[ctx.
|
|
3196
|
+
return ctx.rule.modelField || ctx.parser.modelField || this.fc.modelFields[this.vNode.aliasMap[ctx.type]] || this.fc.modelFields[ctx.type] || this.fc.modelFields[ctx.originType] || 'modelValue';
|
|
3185
3197
|
},
|
|
3186
3198
|
display: function display(vn) {
|
|
3187
3199
|
var _this5 = this;
|
|
@@ -4673,9 +4685,13 @@ function useContext(Handler) {
|
|
|
4673
4685
|
$del(this.formData, id);
|
|
4674
4686
|
$del(this.subForm, id);
|
|
4675
4687
|
$del(this.vm.setupState.ctxInject, id);
|
|
4676
|
-
input && $del(this.form, field);
|
|
4677
4688
|
input && this.rmIdCtx(ctx, field, 'field');
|
|
4678
4689
|
name && this.rmIdCtx(ctx, name, 'name');
|
|
4690
|
+
|
|
4691
|
+
if (input && !hasProperty(this.fieldCtx, field)) {
|
|
4692
|
+
$del(this.form, field);
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4679
4695
|
this.deferSyncValue(function () {
|
|
4680
4696
|
if (!_this4.reloading) {
|
|
4681
4697
|
if (ctx.parser.loadChildren !== false) {
|
|
@@ -6531,7 +6547,7 @@ function install(FormCreate) {
|
|
|
6531
6547
|
function elmFormCreate() {
|
|
6532
6548
|
return FormCreateFactory({
|
|
6533
6549
|
ui: 'element-ui',
|
|
6534
|
-
version: '3.1.
|
|
6550
|
+
version: '3.1.10',
|
|
6535
6551
|
manager: manager,
|
|
6536
6552
|
extendApi: extendApi,
|
|
6537
6553
|
install: install,
|