@form-create/element-ui 3.1.6 → 3.1.9
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 +46 -18
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +46 -18
- package/dist/form-create.min.js +2 -2
- package/package.json +4 -4
- package/src/core/manager.js +22 -9
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.9
|
|
3
3
|
* (c) 2018-2022 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -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
|
},
|
|
@@ -2882,6 +2890,9 @@ function Api(h) {
|
|
|
2882
2890
|
h.nextRefresh();
|
|
2883
2891
|
fn && invoke(fn);
|
|
2884
2892
|
},
|
|
2893
|
+
deferSyncValue: function deferSyncValue(fn, sync) {
|
|
2894
|
+
h.deferSyncValue(fn, sync);
|
|
2895
|
+
},
|
|
2885
2896
|
emit: function emit(name) {
|
|
2886
2897
|
var _h$vm;
|
|
2887
2898
|
|
|
@@ -3173,7 +3184,9 @@ function useRender$1(Render) {
|
|
|
3173
3184
|
}
|
|
3174
3185
|
|
|
3175
3186
|
return function () {
|
|
3176
|
-
|
|
3187
|
+
var cache = _this4.getCache(ctx);
|
|
3188
|
+
|
|
3189
|
+
return cache && cache.apply(void 0, arguments);
|
|
3177
3190
|
};
|
|
3178
3191
|
} catch (e) {
|
|
3179
3192
|
console.error(e);
|
|
@@ -3181,7 +3194,7 @@ function useRender$1(Render) {
|
|
|
3181
3194
|
}
|
|
3182
3195
|
},
|
|
3183
3196
|
getModelField: function getModelField(ctx) {
|
|
3184
|
-
return ctx.rule.modelField || ctx.parser.modelField || this.fc.modelFields[this.vNode.aliasMap[ctx.
|
|
3197
|
+
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
3198
|
},
|
|
3186
3199
|
display: function display(vn) {
|
|
3187
3200
|
var _this5 = this;
|
|
@@ -5538,7 +5551,7 @@ function FormCreateFactory(config) {
|
|
|
5538
5551
|
});
|
|
5539
5552
|
}
|
|
5540
5553
|
|
|
5541
|
-
this.initOptions(this.options
|
|
5554
|
+
this.initOptions(this.options.value);
|
|
5542
5555
|
this.$handle.init();
|
|
5543
5556
|
},
|
|
5544
5557
|
isSub: function isSub() {
|
|
@@ -6066,8 +6079,10 @@ var manager = {
|
|
|
6066
6079
|
makeInfo: function makeInfo(rule, uni) {
|
|
6067
6080
|
var _this4 = this;
|
|
6068
6081
|
|
|
6069
|
-
var titleProp = rule.title;
|
|
6070
|
-
|
|
6082
|
+
var titleProp = _objectSpread2({}, rule.title);
|
|
6083
|
+
|
|
6084
|
+
var infoProp = _objectSpread2({}, rule.info);
|
|
6085
|
+
|
|
6071
6086
|
var isTip = isTooltip(infoProp);
|
|
6072
6087
|
var form = this.options.form;
|
|
6073
6088
|
var children = [(titleProp.title || '') + (form.labelSuffix || form['label-suffix'] || '')];
|
|
@@ -6081,6 +6096,8 @@ var manager = {
|
|
|
6081
6096
|
delete prop.props.icon;
|
|
6082
6097
|
delete prop.props.show;
|
|
6083
6098
|
delete prop.props.info;
|
|
6099
|
+
delete prop.props.align;
|
|
6100
|
+
delete prop.props["native"];
|
|
6084
6101
|
var field = 'content';
|
|
6085
6102
|
|
|
6086
6103
|
if (infoProp.info && !hasProperty(prop.props, field)) {
|
|
@@ -6102,11 +6119,16 @@ var manager = {
|
|
|
6102
6119
|
})));
|
|
6103
6120
|
}
|
|
6104
6121
|
|
|
6105
|
-
|
|
6122
|
+
var _prop = mergeProps([titleProp, {
|
|
6106
6123
|
props: titleProp,
|
|
6107
6124
|
key: "".concat(uni, "tit"),
|
|
6108
6125
|
type: titleProp.type || 'span'
|
|
6109
|
-
}])
|
|
6126
|
+
}]);
|
|
6127
|
+
|
|
6128
|
+
delete _prop.props.show;
|
|
6129
|
+
delete _prop.props.title;
|
|
6130
|
+
delete _prop.props["native"];
|
|
6131
|
+
return this.$r(_prop, children);
|
|
6110
6132
|
},
|
|
6111
6133
|
makeCol: function makeCol(rule, uni, children) {
|
|
6112
6134
|
var col = rule.col;
|
|
@@ -6162,6 +6184,9 @@ var manager = {
|
|
|
6162
6184
|
|
|
6163
6185
|
var innerText = resetBtn.innerText;
|
|
6164
6186
|
delete resetBtn.innerText;
|
|
6187
|
+
delete resetBtn.click;
|
|
6188
|
+
delete resetBtn.col;
|
|
6189
|
+
delete resetBtn.show;
|
|
6165
6190
|
return this.$r({
|
|
6166
6191
|
type: 'button',
|
|
6167
6192
|
props: resetBtn,
|
|
@@ -6171,7 +6196,7 @@ var manager = {
|
|
|
6171
6196
|
on: {
|
|
6172
6197
|
click: function click() {
|
|
6173
6198
|
var fApi = _this5.$handle.api;
|
|
6174
|
-
resetBtn.click ? resetBtn.click(fApi) : fApi.resetFields();
|
|
6199
|
+
_this5.options.resetBtn.click ? _this5.options.resetBtn.click(fApi) : fApi.resetFields();
|
|
6175
6200
|
}
|
|
6176
6201
|
},
|
|
6177
6202
|
key: "".concat(this.key, "b2")
|
|
@@ -6184,6 +6209,9 @@ var manager = {
|
|
|
6184
6209
|
|
|
6185
6210
|
var innerText = submitBtn.innerText;
|
|
6186
6211
|
delete submitBtn.innerText;
|
|
6212
|
+
delete submitBtn.click;
|
|
6213
|
+
delete submitBtn.col;
|
|
6214
|
+
delete submitBtn.show;
|
|
6187
6215
|
return this.$r({
|
|
6188
6216
|
type: 'button',
|
|
6189
6217
|
props: submitBtn,
|
|
@@ -6193,7 +6221,7 @@ var manager = {
|
|
|
6193
6221
|
on: {
|
|
6194
6222
|
click: function click() {
|
|
6195
6223
|
var fApi = _this6.$handle.api;
|
|
6196
|
-
submitBtn.click ? submitBtn.click(fApi) : fApi.submit();
|
|
6224
|
+
_this6.options.submitBtn.click ? _this6.options.submitBtn.click(fApi) : fApi.submit();
|
|
6197
6225
|
}
|
|
6198
6226
|
},
|
|
6199
6227
|
key: "".concat(this.key, "b1")
|
|
@@ -6516,7 +6544,7 @@ function install(FormCreate) {
|
|
|
6516
6544
|
function elmFormCreate() {
|
|
6517
6545
|
return FormCreateFactory({
|
|
6518
6546
|
ui: 'element-ui',
|
|
6519
|
-
version: '3.1.
|
|
6547
|
+
version: '3.1.9',
|
|
6520
6548
|
manager: manager,
|
|
6521
6549
|
extendApi: extendApi,
|
|
6522
6550
|
install: install,
|