@form-create/element-ui 3.2.25 → 3.2.27
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 -16
- package/dist/form-create.esm.min.js +2 -2
- package/dist/form-create.js +46 -16
- package/dist/form-create.min.js +2 -2
- package/package.json +4 -4
- package/src/core/manager.js +9 -1
package/dist/form-create.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.2.
|
|
2
|
+
* @form-create/element-ui v3.2.27
|
|
3
3
|
* (c) 2018-2025 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -1457,6 +1457,7 @@
|
|
|
1457
1457
|
httpRequest: Function,
|
|
1458
1458
|
modalTitle: String,
|
|
1459
1459
|
listType: String,
|
|
1460
|
+
uploadText: String,
|
|
1460
1461
|
formCreateInject: Object,
|
|
1461
1462
|
modelValue: [Array, String, Object]
|
|
1462
1463
|
},
|
|
@@ -1551,7 +1552,7 @@
|
|
|
1551
1552
|
"type": "primary"
|
|
1552
1553
|
}, {
|
|
1553
1554
|
"default": function _default() {
|
|
1554
|
-
return [_this.formCreateInject.t('clickToUpload') || '点击上传'];
|
|
1555
|
+
return [_this.formCreateInject.t('clickToUpload') || _this.uploadText || '点击上传'];
|
|
1555
1556
|
}
|
|
1556
1557
|
}))];
|
|
1557
1558
|
}
|
|
@@ -2762,6 +2763,7 @@
|
|
|
2762
2763
|
index: [String, Number],
|
|
2763
2764
|
api: Object,
|
|
2764
2765
|
locale: [String, Object],
|
|
2766
|
+
t: Function,
|
|
2765
2767
|
name: String,
|
|
2766
2768
|
subForm: {
|
|
2767
2769
|
type: Boolean,
|
|
@@ -3815,6 +3817,12 @@
|
|
|
3815
3817
|
}
|
|
3816
3818
|
});
|
|
3817
3819
|
},
|
|
3820
|
+
setGlobalData: function setGlobalData(name, value) {
|
|
3821
|
+
api.setData('$globalData.' + name, value);
|
|
3822
|
+
},
|
|
3823
|
+
setGlobalVar: function setGlobalVar(name, value) {
|
|
3824
|
+
api.setData('$var.' + name, value);
|
|
3825
|
+
},
|
|
3818
3826
|
renderRule: function renderRule(id, onInput, force) {
|
|
3819
3827
|
var flag = _typeof(id) === 'object';
|
|
3820
3828
|
var ctx = flag ? byCtx(id) : h.getCtx(id);
|
|
@@ -4316,6 +4324,9 @@
|
|
|
4316
4324
|
slots: function slots() {
|
|
4317
4325
|
return _this6.vm.setupState.top.slots;
|
|
4318
4326
|
},
|
|
4327
|
+
getWrap: function getWrap() {
|
|
4328
|
+
return _this6.vm.refs[ctx.wrapRef];
|
|
4329
|
+
},
|
|
4319
4330
|
options: [],
|
|
4320
4331
|
children: [],
|
|
4321
4332
|
preview: false,
|
|
@@ -5664,6 +5675,8 @@
|
|
|
5664
5675
|
});
|
|
5665
5676
|
});
|
|
5666
5677
|
}
|
|
5678
|
+
|
|
5679
|
+
this.$manager.fieldChange(ctx, value, formValue, setFlag);
|
|
5667
5680
|
},
|
|
5668
5681
|
onInput: function onInput(ctx, value) {
|
|
5669
5682
|
var val;
|
|
@@ -7305,6 +7318,7 @@
|
|
|
7305
7318
|
getDefaultOptions: function getDefaultOptions() {
|
|
7306
7319
|
return {};
|
|
7307
7320
|
},
|
|
7321
|
+
fieldChange: function fieldChange(ctx, value, formValue, setFlag) {},
|
|
7308
7322
|
render: function render(children) {}
|
|
7309
7323
|
});
|
|
7310
7324
|
|
|
@@ -7480,8 +7494,8 @@
|
|
|
7480
7494
|
}
|
|
7481
7495
|
|
|
7482
7496
|
var method = options.method;
|
|
7483
|
-
|
|
7484
|
-
|
|
7497
|
+
|
|
7498
|
+
var validate = _objectSpread2(_objectSpread2({}, options), {}, {
|
|
7485
7499
|
validator: function validator() {
|
|
7486
7500
|
var ctx = byCtx(rule);
|
|
7487
7501
|
|
|
@@ -7497,7 +7511,10 @@
|
|
|
7497
7511
|
}]));
|
|
7498
7512
|
}
|
|
7499
7513
|
}
|
|
7500
|
-
})
|
|
7514
|
+
});
|
|
7515
|
+
|
|
7516
|
+
delete validate.method;
|
|
7517
|
+
attr.getProp().validate = [validate];
|
|
7501
7518
|
}
|
|
7502
7519
|
},
|
|
7503
7520
|
watch: function watch() {
|
|
@@ -8337,10 +8354,17 @@
|
|
|
8337
8354
|
return 'zh-cn';
|
|
8338
8355
|
},
|
|
8339
8356
|
globalLanguageDriver: function globalLanguageDriver(id) {
|
|
8357
|
+
var t = this.vm.setupState.top.props.t;
|
|
8340
8358
|
var locale = this.vm.setupState.top.props.locale;
|
|
8341
8359
|
var value = undefined;
|
|
8342
8360
|
|
|
8343
|
-
if (
|
|
8361
|
+
if (t) {
|
|
8362
|
+
value = invoke(function () {
|
|
8363
|
+
return t(id);
|
|
8364
|
+
});
|
|
8365
|
+
}
|
|
8366
|
+
|
|
8367
|
+
if (value == null && locale && _typeof(locale) === 'object') {
|
|
8344
8368
|
value = deepGet(locale, id);
|
|
8345
8369
|
}
|
|
8346
8370
|
|
|
@@ -8398,8 +8422,11 @@
|
|
|
8398
8422
|
if (id != null) {
|
|
8399
8423
|
var split = id.split('.');
|
|
8400
8424
|
var key = split.shift();
|
|
8425
|
+
val = deepGet(this.vm.setupState.top.setupState.fc.tmpData, id);
|
|
8401
8426
|
|
|
8402
|
-
if (
|
|
8427
|
+
if (val != null) {
|
|
8428
|
+
return val;
|
|
8429
|
+
} else if (key === '$topForm') {
|
|
8403
8430
|
val = this.$handle.api.top.formData(true);
|
|
8404
8431
|
} else if (key === '$scopeForm') {
|
|
8405
8432
|
val = this.$handle.api.scope.formData(true);
|
|
@@ -8422,13 +8449,7 @@
|
|
|
8422
8449
|
} else if (key === '$preview') {
|
|
8423
8450
|
return this.$handle.preview;
|
|
8424
8451
|
} else {
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
if (!hasProperty(tmpData, key)) {
|
|
8428
|
-
tmpData[key] = defValueTag;
|
|
8429
|
-
}
|
|
8430
|
-
|
|
8431
|
-
val = tmpData[key] !== defValueTag ? deepGet(tmpData, id) : getData(id);
|
|
8452
|
+
val = getData(id);
|
|
8432
8453
|
split = [];
|
|
8433
8454
|
}
|
|
8434
8455
|
|
|
@@ -8987,6 +9008,13 @@
|
|
|
8987
9008
|
fItem.clearValidate();
|
|
8988
9009
|
}
|
|
8989
9010
|
},
|
|
9011
|
+
fieldChange: function fieldChange(ctx, value, formValue, setFlag) {
|
|
9012
|
+
if (!setFlag) {
|
|
9013
|
+
var _this$vm$refs$ctx$wra, _this$vm$refs$ctx$wra2;
|
|
9014
|
+
|
|
9015
|
+
(_this$vm$refs$ctx$wra = this.vm.refs[ctx.wrapRef]) === null || _this$vm$refs$ctx$wra === void 0 ? void 0 : (_this$vm$refs$ctx$wra2 = _this$vm$refs$ctx$wra.validate('change')) === null || _this$vm$refs$ctx$wra2 === void 0 ? void 0 : _this$vm$refs$ctx$wra2["catch"](function () {});
|
|
9016
|
+
}
|
|
9017
|
+
},
|
|
8990
9018
|
tidyOptions: function tidyOptions(options) {
|
|
8991
9019
|
['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(function (name) {
|
|
8992
9020
|
tidyBool(options, name);
|
|
@@ -9070,6 +9098,8 @@
|
|
|
9070
9098
|
var _this$rule$props = this.rule.props,
|
|
9071
9099
|
inline = _this$rule$props.inline,
|
|
9072
9100
|
_col = _this$rule$props.col;
|
|
9101
|
+
var cls = rule.wrap["class"];
|
|
9102
|
+
delete rule.wrap["class"];
|
|
9073
9103
|
delete rule.wrap.title;
|
|
9074
9104
|
var item = isFalse(rule.wrap.show) ? children : this.$r(mergeProps([rule.wrap, {
|
|
9075
9105
|
props: _objectSpread2(_objectSpread2({
|
|
@@ -9079,7 +9109,7 @@
|
|
|
9079
9109
|
prop: ctx.id,
|
|
9080
9110
|
rules: ctx.injectValidate()
|
|
9081
9111
|
}),
|
|
9082
|
-
"class": this.$render.mergeClass(rule.className, 'fc-form-item'),
|
|
9112
|
+
"class": this.$render.mergeClass(cls || rule.className, 'fc-form-item'),
|
|
9083
9113
|
key: "".concat(uni, "fi"),
|
|
9084
9114
|
ref: ctx.wrapRef,
|
|
9085
9115
|
type: 'formItem'
|
|
@@ -9623,7 +9653,7 @@
|
|
|
9623
9653
|
function elmFormCreate() {
|
|
9624
9654
|
return FormCreateFactory({
|
|
9625
9655
|
ui: 'element-ui',
|
|
9626
|
-
version: '3.2.
|
|
9656
|
+
version: '3.2.27',
|
|
9627
9657
|
manager: manager,
|
|
9628
9658
|
extendApi: extendApi,
|
|
9629
9659
|
install: install,
|