@form-create/element-ui 3.1.13 → 3.1.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/dist/form-create.esm.js +19 -11
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +19 -11
- package/dist/form-create.min.js +2 -2
- package/package.json +11 -11
- package/src/core/manager.js +9 -3
- package/types/config.d.ts +16 -16
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.15
|
|
3
3
|
* (c) 2018-2022 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -1493,7 +1493,7 @@ var Group = defineComponent({
|
|
|
1493
1493
|
form: markRaw(this.formCreateInject.form.$form())
|
|
1494
1494
|
};
|
|
1495
1495
|
},
|
|
1496
|
-
emits: ['update:modelValue', 'change', 'itemMounted', 'remove'],
|
|
1496
|
+
emits: ['update:modelValue', 'change', 'itemMounted', 'remove', 'add'],
|
|
1497
1497
|
watch: {
|
|
1498
1498
|
rule: {
|
|
1499
1499
|
handler: function handler(n, o) {
|
|
@@ -1549,7 +1549,7 @@ var Group = defineComponent({
|
|
|
1549
1549
|
|
|
1550
1550
|
if (len < 0) {
|
|
1551
1551
|
for (var i = len; i < 0; i++) {
|
|
1552
|
-
this.addRule(n.length + i);
|
|
1552
|
+
this.addRule(n.length + i, true);
|
|
1553
1553
|
}
|
|
1554
1554
|
|
|
1555
1555
|
for (var _i = 0; _i < total; _i++) {
|
|
@@ -3000,7 +3000,7 @@ function toString(val) {
|
|
|
3000
3000
|
|
|
3001
3001
|
var id$2 = 0;
|
|
3002
3002
|
function uniqueId() {
|
|
3003
|
-
return Math.random().toString(36).substr(3, 3) + Number("".concat(Date.now()).concat(++id$2)).toString(36);
|
|
3003
|
+
return 'F' + Math.random().toString(36).substr(3, 3) + Number("".concat(Date.now()).concat(++id$2)).toString(36);
|
|
3004
3004
|
}
|
|
3005
3005
|
|
|
3006
3006
|
function deepSet(data, idx, val) {
|
|
@@ -4354,7 +4354,7 @@ function useInput(Handler) {
|
|
|
4354
4354
|
}
|
|
4355
4355
|
},
|
|
4356
4356
|
setFormData: function setFormData(ctx, value) {
|
|
4357
|
-
$set(this.formData, ctx.id, value
|
|
4357
|
+
$set(this.formData, ctx.id, value);
|
|
4358
4358
|
},
|
|
4359
4359
|
getFormData: function getFormData(ctx) {
|
|
4360
4360
|
return this.formData[ctx.id];
|
|
@@ -4644,6 +4644,8 @@ function useContext(Handler) {
|
|
|
4644
4644
|
|
|
4645
4645
|
_this.$render.clearCache(ctx);
|
|
4646
4646
|
|
|
4647
|
+
_this.refresh();
|
|
4648
|
+
|
|
4647
4649
|
_this.watching = false;
|
|
4648
4650
|
}, {
|
|
4649
4651
|
deep: !flag,
|
|
@@ -4657,7 +4659,6 @@ function useContext(Handler) {
|
|
|
4657
4659
|
return val.value;
|
|
4658
4660
|
}, function () {
|
|
4659
4661
|
var formValue = ctx.parser.toFormValue(val.value, ctx);
|
|
4660
|
-
formValue = formValue === null ? undefined : formValue;
|
|
4661
4662
|
|
|
4662
4663
|
if (_this.isChange(ctx, formValue)) {
|
|
4663
4664
|
_this.setValue(ctx, val.value, formValue, true);
|
|
@@ -4696,7 +4697,7 @@ function useContext(Handler) {
|
|
|
4696
4697
|
|
|
4697
4698
|
this.deferSyncValue(function () {
|
|
4698
4699
|
o && o.forEach(function (child) {
|
|
4699
|
-
if ((n || []).indexOf(child) === -1 && child && !is.String(child) && child.__fc__) {
|
|
4700
|
+
if ((n || []).indexOf(child) === -1 && child && !is.String(child) && child.__fc__ && child.__fc__.parent === ctx) {
|
|
4700
4701
|
_this2.rmCtx(child.__fc__);
|
|
4701
4702
|
}
|
|
4702
4703
|
});
|
|
@@ -5994,6 +5995,13 @@ function tidyBool(opt, name) {
|
|
|
5994
5995
|
}
|
|
5995
5996
|
}
|
|
5996
5997
|
|
|
5998
|
+
function tidyRule(rule) {
|
|
5999
|
+
var _rule = _objectSpread2({}, rule);
|
|
6000
|
+
|
|
6001
|
+
delete _rule.children;
|
|
6002
|
+
return _rule;
|
|
6003
|
+
}
|
|
6004
|
+
|
|
5997
6005
|
var manager = {
|
|
5998
6006
|
validate: function validate() {
|
|
5999
6007
|
var form = this.form();
|
|
@@ -6115,7 +6123,7 @@ var manager = {
|
|
|
6115
6123
|
props: _objectSpread2(_objectSpread2({
|
|
6116
6124
|
labelWidth: labelWidth === void 0 ? labelWidth : toString(labelWidth),
|
|
6117
6125
|
label: isTitle ? rule.title.title : undefined
|
|
6118
|
-
}, rule.wrap || {}), {}, {
|
|
6126
|
+
}, tidyRule(rule.wrap || {})), {}, {
|
|
6119
6127
|
prop: ctx.id,
|
|
6120
6128
|
rules: rule.validate
|
|
6121
6129
|
}),
|
|
@@ -6153,7 +6161,7 @@ var manager = {
|
|
|
6153
6161
|
if (!isFalse(infoProp.show) && (infoProp.info || infoProp["native"]) && !isFalse(infoProp.icon)) {
|
|
6154
6162
|
var prop = {
|
|
6155
6163
|
type: infoProp.type || 'popover',
|
|
6156
|
-
props:
|
|
6164
|
+
props: tidyRule(infoProp),
|
|
6157
6165
|
key: "".concat(uni, "pop")
|
|
6158
6166
|
};
|
|
6159
6167
|
delete prop.props.icon;
|
|
@@ -6183,7 +6191,7 @@ var manager = {
|
|
|
6183
6191
|
}
|
|
6184
6192
|
|
|
6185
6193
|
var _prop = mergeProps([titleProp, {
|
|
6186
|
-
props: titleProp,
|
|
6194
|
+
props: tidyRule(titleProp),
|
|
6187
6195
|
key: "".concat(uni, "tit"),
|
|
6188
6196
|
type: titleProp.type || 'span'
|
|
6189
6197
|
}]);
|
|
@@ -6608,7 +6616,7 @@ function install(FormCreate) {
|
|
|
6608
6616
|
function elmFormCreate() {
|
|
6609
6617
|
return FormCreateFactory({
|
|
6610
6618
|
ui: 'element-ui',
|
|
6611
|
-
version: '3.1.
|
|
6619
|
+
version: '3.1.15',
|
|
6612
6620
|
manager: manager,
|
|
6613
6621
|
extendApi: extendApi,
|
|
6614
6622
|
install: install,
|