@form-create/element-ui 3.2.25 → 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.25
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,
@@ -7480,8 +7482,8 @@
7480
7482
  }
7481
7483
 
7482
7484
  var method = options.method;
7483
- delete options.method;
7484
- attr.getProp().validate = [_objectSpread2(_objectSpread2({}, options), {}, {
7485
+
7486
+ var validate = _objectSpread2(_objectSpread2({}, options), {}, {
7485
7487
  validator: function validator() {
7486
7488
  var ctx = byCtx(rule);
7487
7489
 
@@ -7497,7 +7499,10 @@
7497
7499
  }]));
7498
7500
  }
7499
7501
  }
7500
- })];
7502
+ });
7503
+
7504
+ delete validate.method;
7505
+ attr.getProp().validate = [validate];
7501
7506
  }
7502
7507
  },
7503
7508
  watch: function watch() {
@@ -8337,10 +8342,17 @@
8337
8342
  return 'zh-cn';
8338
8343
  },
8339
8344
  globalLanguageDriver: function globalLanguageDriver(id) {
8345
+ var t = this.vm.setupState.top.props.t;
8340
8346
  var locale = this.vm.setupState.top.props.locale;
8341
8347
  var value = undefined;
8342
8348
 
8343
- 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') {
8344
8356
  value = deepGet(locale, id);
8345
8357
  }
8346
8358
 
@@ -9070,6 +9082,8 @@
9070
9082
  var _this$rule$props = this.rule.props,
9071
9083
  inline = _this$rule$props.inline,
9072
9084
  _col = _this$rule$props.col;
9085
+ var cls = rule.wrap["class"];
9086
+ delete rule.wrap["class"];
9073
9087
  delete rule.wrap.title;
9074
9088
  var item = isFalse(rule.wrap.show) ? children : this.$r(mergeProps([rule.wrap, {
9075
9089
  props: _objectSpread2(_objectSpread2({
@@ -9079,7 +9093,7 @@
9079
9093
  prop: ctx.id,
9080
9094
  rules: ctx.injectValidate()
9081
9095
  }),
9082
- "class": this.$render.mergeClass(rule.className, 'fc-form-item'),
9096
+ "class": this.$render.mergeClass(cls || rule.className, 'fc-form-item'),
9083
9097
  key: "".concat(uni, "fi"),
9084
9098
  ref: ctx.wrapRef,
9085
9099
  type: 'formItem'
@@ -9623,7 +9637,7 @@
9623
9637
  function elmFormCreate() {
9624
9638
  return FormCreateFactory({
9625
9639
  ui: 'element-ui',
9626
- version: '3.2.25',
9640
+ version: '3.2.26',
9627
9641
  manager: manager,
9628
9642
  extendApi: extendApi,
9629
9643
  install: install,