@form-create/element-ui 3.2.24 → 3.2.26

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,5 +1,5 @@
1
1
  /*!
2
- * @form-create/element-ui v3.2.24
2
+ * @form-create/element-ui v3.2.26
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,
@@ -6761,19 +6763,34 @@
6761
6763
 
6762
6764
  var hook = (_ctx$prop = ctx.prop) === null || _ctx$prop === void 0 ? void 0 : (_ctx$prop$hook = _ctx$prop.hook) === null || _ctx$prop$hook === void 0 ? void 0 : _ctx$prop$hook[name];
6763
6765
 
6764
- if (hook) {
6765
- hook = Array.isArray(hook) ? hook : [hook];
6766
- hook.forEach(function (fn) {
6767
- invoke(function () {
6768
- return fn(_objectSpread2(_objectSpread2({}, args || {}), {}, {
6769
- self: ctx.rule,
6770
- rule: ctx.rule,
6771
- $f: _this2.api,
6772
- api: _this2.api,
6773
- option: _this2.vm.props.option
6774
- }));
6766
+ var run = function run(on, p) {
6767
+ if (on) {
6768
+ on = Array.isArray(on) ? on : [on];
6769
+ on.forEach(function (fn) {
6770
+ invoke(function () {
6771
+ return fn(_objectSpread2(_objectSpread2({}, args || {}), {}, {
6772
+ self: ctx.rule,
6773
+ rule: ctx.rule,
6774
+ parent: p === null || p === void 0 ? void 0 : p.rule,
6775
+ $f: _this2.api,
6776
+ api: _this2.api,
6777
+ option: _this2.vm.props.option
6778
+ }));
6779
+ });
6775
6780
  });
6776
- });
6781
+ }
6782
+ };
6783
+
6784
+ run(hook);
6785
+ var deepName = 'deep' + upper(name);
6786
+ var parent = ctx.parent;
6787
+
6788
+ while (parent) {
6789
+ var _parent$prop, _parent$prop$hook;
6790
+
6791
+ var deepHook = (_parent$prop = parent.prop) === null || _parent$prop === void 0 ? void 0 : (_parent$prop$hook = _parent$prop.hook) === null || _parent$prop$hook === void 0 ? void 0 : _parent$prop$hook[deepName];
6792
+ run(deepHook, parent);
6793
+ parent = parent.parent;
6777
6794
  }
6778
6795
  }
6779
6796
  });
@@ -7151,7 +7168,8 @@
7151
7168
  }
7152
7169
  },
7153
7170
  h: function h(tag, data, children) {
7154
- var isNativeTag = this.vm.appContext.config.isNativeTag(tag);
7171
+ var vm = this.vm || vue.getCurrentInstance();
7172
+ var isNativeTag = vm.appContext.config.isNativeTag(tag);
7155
7173
 
7156
7174
  if (isNativeTag) {
7157
7175
  delete data.formCreateInject;
@@ -7464,8 +7482,8 @@
7464
7482
  }
7465
7483
 
7466
7484
  var method = options.method;
7467
- delete options.method;
7468
- attr.getProp().validate = [_objectSpread2(_objectSpread2({}, options), {}, {
7485
+
7486
+ var validate = _objectSpread2(_objectSpread2({}, options), {}, {
7469
7487
  validator: function validator() {
7470
7488
  var ctx = byCtx(rule);
7471
7489
 
@@ -7481,7 +7499,10 @@
7481
7499
  }]));
7482
7500
  }
7483
7501
  }
7484
- })];
7502
+ });
7503
+
7504
+ delete validate.method;
7505
+ attr.getProp().validate = [validate];
7485
7506
  }
7486
7507
  },
7487
7508
  watch: function watch() {
@@ -8321,10 +8342,17 @@
8321
8342
  return 'zh-cn';
8322
8343
  },
8323
8344
  globalLanguageDriver: function globalLanguageDriver(id) {
8345
+ var t = this.vm.setupState.top.props.t;
8324
8346
  var locale = this.vm.setupState.top.props.locale;
8325
8347
  var value = undefined;
8326
8348
 
8327
- if (locale && _typeof(locale) === 'object') {
8349
+ if (t) {
8350
+ value = invoke(function () {
8351
+ return t(id);
8352
+ });
8353
+ }
8354
+
8355
+ if (value == null && locale && _typeof(locale) === 'object') {
8328
8356
  value = deepGet(locale, id);
8329
8357
  }
8330
8358
 
@@ -9054,6 +9082,8 @@
9054
9082
  var _this$rule$props = this.rule.props,
9055
9083
  inline = _this$rule$props.inline,
9056
9084
  _col = _this$rule$props.col;
9085
+ var cls = rule.wrap["class"];
9086
+ delete rule.wrap["class"];
9057
9087
  delete rule.wrap.title;
9058
9088
  var item = isFalse(rule.wrap.show) ? children : this.$r(mergeProps([rule.wrap, {
9059
9089
  props: _objectSpread2(_objectSpread2({
@@ -9063,7 +9093,7 @@
9063
9093
  prop: ctx.id,
9064
9094
  rules: ctx.injectValidate()
9065
9095
  }),
9066
- "class": this.$render.mergeClass(rule.className, 'fc-form-item'),
9096
+ "class": this.$render.mergeClass(cls || rule.className, 'fc-form-item'),
9067
9097
  key: "".concat(uni, "fi"),
9068
9098
  ref: ctx.wrapRef,
9069
9099
  type: 'formItem'
@@ -9607,7 +9637,7 @@
9607
9637
  function elmFormCreate() {
9608
9638
  return FormCreateFactory({
9609
9639
  ui: 'element-ui',
9610
- version: '3.2.24',
9640
+ version: '3.2.26',
9611
9641
  manager: manager,
9612
9642
  extendApi: extendApi,
9613
9643
  install: install,