@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * @form-create/element-ui v3.2.16
3
- * (c) 2018-2024 xaboy
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
  */
@@ -4474,24 +4474,16 @@
4474
4474
  return _this4.loadStrVar(str, get);
4475
4475
  };
4476
4476
 
4477
- options.action = loadVal(options.action);
4478
-
4479
- if (options.headers) {
4480
- var _headers = {};
4481
- Object.keys(options.headers).forEach(function (k) {
4482
- _headers[loadVal(k)] = loadVal(options.headers[k]);
4483
- });
4484
- options.headers = _headers;
4485
- }
4486
-
4487
- if (options.data) {
4488
- var _data = {};
4489
- Object.keys(options.data).forEach(function (k) {
4490
- _data[loadVal(k)] = loadVal(options.data[k]);
4491
- });
4492
- options.data = _data;
4493
- }
4494
-
4477
+ options.action = loadVal(options.action || '');
4478
+ ['headers', 'data', 'query'].forEach(function (key) {
4479
+ if (options[key]) {
4480
+ var data = {};
4481
+ Object.keys(options[key]).forEach(function (k) {
4482
+ data[loadVal(k)] = loadVal(options[key][k]);
4483
+ });
4484
+ options[key] = data;
4485
+ }
4486
+ });
4495
4487
  return options;
4496
4488
  }
4497
4489
  });
@@ -6627,6 +6619,8 @@
6627
6619
 
6628
6620
  if (attr.template) {
6629
6621
  value = fc.$handle.loadStrVar(attr.template, get);
6622
+ } else if (attr.handler && is.Function(attr.handler)) {
6623
+ value = attr.handler(get, rule, api);
6630
6624
  } else {
6631
6625
  value = get(attr.attr, attr["default"]);
6632
6626
  }
@@ -7440,10 +7434,6 @@
7440
7434
  t: function t(id, params, get) {
7441
7435
  var value = get ? get('$t.' + id) : this.globalLanguageDriver(id);
7442
7436
 
7443
- if (value == null && this.vm.appContext.config.globalProperties.$i18n) {
7444
- return this.vm.appContext.config.globalProperties.$i18n.t(id, params);
7445
- }
7446
-
7447
7437
  if (value == null) {
7448
7438
  value = '';
7449
7439
  }
@@ -7551,10 +7541,6 @@
7551
7541
  return locale;
7552
7542
  }
7553
7543
 
7554
- if (this.vm.appContext.config.globalProperties.$i18n && this.vm.appContext.config.globalProperties.$i18n.locale) {
7555
- return this.vm.appContext.config.globalProperties.$i18n.locale;
7556
- }
7557
-
7558
7544
  return 'zh-cn';
7559
7545
  },
7560
7546
  globalLanguageDriver: function globalLanguageDriver(id) {
@@ -7583,7 +7569,7 @@
7583
7569
  var option = this.options.value.globalVariable && this.options.value.globalVariable[key];
7584
7570
 
7585
7571
  if (option) {
7586
- var handle = is.Function(option) ? option : option.handle;
7572
+ var handle = is.Function(option) ? option : parseFn(option.handle);
7587
7573
 
7588
7574
  if (handle) {
7589
7575
  return deepGet(invoke(function () {
@@ -8801,7 +8787,7 @@
8801
8787
  function elmFormCreate() {
8802
8788
  return FormCreateFactory({
8803
8789
  ui: 'element-ui',
8804
- version: '3.2.16',
8790
+ version: '3.2.17',
8805
8791
  manager: manager,
8806
8792
  extendApi: extendApi,
8807
8793
  install: install,