@form-create/element-ui 3.2.16 → 3.2.17
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 +16 -30
- package/dist/form-create.esm.min.js +3 -3
- package/dist/form-create.js +16 -30
- package/dist/form-create.min.js +3 -3
- package/package.json +3 -3
package/dist/form-create.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @form-create/element-ui v3.2.
|
|
3
|
-
* (c) 2018-
|
|
2
|
+
* @form-create/element-ui v3.2.17
|
|
3
|
+
* (c) 2018-2025 xaboy
|
|
4
4
|
* Github https://github.com/xaboy/form-create
|
|
5
5
|
* Released under the MIT License.
|
|
6
6
|
*/
|
|
@@ -4470,24 +4470,16 @@ function useInject(Handler) {
|
|
|
4470
4470
|
return _this4.loadStrVar(str, get);
|
|
4471
4471
|
};
|
|
4472
4472
|
|
|
4473
|
-
options.action = loadVal(options.action);
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
if (options.data) {
|
|
4484
|
-
var _data = {};
|
|
4485
|
-
Object.keys(options.data).forEach(function (k) {
|
|
4486
|
-
_data[loadVal(k)] = loadVal(options.data[k]);
|
|
4487
|
-
});
|
|
4488
|
-
options.data = _data;
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4473
|
+
options.action = loadVal(options.action || '');
|
|
4474
|
+
['headers', 'data', 'query'].forEach(function (key) {
|
|
4475
|
+
if (options[key]) {
|
|
4476
|
+
var data = {};
|
|
4477
|
+
Object.keys(options[key]).forEach(function (k) {
|
|
4478
|
+
data[loadVal(k)] = loadVal(options[key][k]);
|
|
4479
|
+
});
|
|
4480
|
+
options[key] = data;
|
|
4481
|
+
}
|
|
4482
|
+
});
|
|
4491
4483
|
return options;
|
|
4492
4484
|
}
|
|
4493
4485
|
});
|
|
@@ -6623,6 +6615,8 @@ var loadData = function loadData(fc) {
|
|
|
6623
6615
|
|
|
6624
6616
|
if (attr.template) {
|
|
6625
6617
|
value = fc.$handle.loadStrVar(attr.template, get);
|
|
6618
|
+
} else if (attr.handler && is.Function(attr.handler)) {
|
|
6619
|
+
value = attr.handler(get, rule, api);
|
|
6626
6620
|
} else {
|
|
6627
6621
|
value = get(attr.attr, attr["default"]);
|
|
6628
6622
|
}
|
|
@@ -7436,10 +7430,6 @@ function FormCreateFactory(config) {
|
|
|
7436
7430
|
t: function t(id, params, get) {
|
|
7437
7431
|
var value = get ? get('$t.' + id) : this.globalLanguageDriver(id);
|
|
7438
7432
|
|
|
7439
|
-
if (value == null && this.vm.appContext.config.globalProperties.$i18n) {
|
|
7440
|
-
return this.vm.appContext.config.globalProperties.$i18n.t(id, params);
|
|
7441
|
-
}
|
|
7442
|
-
|
|
7443
7433
|
if (value == null) {
|
|
7444
7434
|
value = '';
|
|
7445
7435
|
}
|
|
@@ -7547,10 +7537,6 @@ function FormCreateFactory(config) {
|
|
|
7547
7537
|
return locale;
|
|
7548
7538
|
}
|
|
7549
7539
|
|
|
7550
|
-
if (this.vm.appContext.config.globalProperties.$i18n && this.vm.appContext.config.globalProperties.$i18n.locale) {
|
|
7551
|
-
return this.vm.appContext.config.globalProperties.$i18n.locale;
|
|
7552
|
-
}
|
|
7553
|
-
|
|
7554
7540
|
return 'zh-cn';
|
|
7555
7541
|
},
|
|
7556
7542
|
globalLanguageDriver: function globalLanguageDriver(id) {
|
|
@@ -7579,7 +7565,7 @@ function FormCreateFactory(config) {
|
|
|
7579
7565
|
var option = this.options.value.globalVariable && this.options.value.globalVariable[key];
|
|
7580
7566
|
|
|
7581
7567
|
if (option) {
|
|
7582
|
-
var handle = is.Function(option) ? option : option.handle;
|
|
7568
|
+
var handle = is.Function(option) ? option : parseFn(option.handle);
|
|
7583
7569
|
|
|
7584
7570
|
if (handle) {
|
|
7585
7571
|
return deepGet(invoke(function () {
|
|
@@ -8797,7 +8783,7 @@ function install(FormCreate) {
|
|
|
8797
8783
|
function elmFormCreate() {
|
|
8798
8784
|
return FormCreateFactory({
|
|
8799
8785
|
ui: 'element-ui',
|
|
8800
|
-
version: '3.2.
|
|
8786
|
+
version: '3.2.17',
|
|
8801
8787
|
manager: manager,
|
|
8802
8788
|
extendApi: extendApi,
|
|
8803
8789
|
install: install,
|