@form-create/element-ui 3.2.16 → 3.2.18

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.18
3
+ * (c) 2018-2025 xaboy
4
4
  * Github https://github.com/xaboy/form-create
5
5
  * Released under the MIT License.
6
6
  */
@@ -202,11 +202,11 @@
202
202
  function getSlot(slots, exclude) {
203
203
  return Object.keys(slots).reduce(function (lst, name) {
204
204
  if (!exclude || exclude.indexOf(name) === -1) {
205
- lst.push(slots[name]);
205
+ lst[name] = slots[name];
206
206
  }
207
207
 
208
208
  return lst;
209
- }, []);
209
+ }, {});
210
210
  }
211
211
 
212
212
  function toArray(value) {
@@ -552,10 +552,6 @@
552
552
 
553
553
  script$2.render = render$2;
554
554
 
555
- function _isSlot(s) {
556
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
557
- }
558
-
559
555
  var NAME$7 = 'fcFrame';
560
556
  var Frame = vue.defineComponent({
561
557
  name: NAME$7,
@@ -595,11 +591,11 @@
595
591
  },
596
592
  okBtnText: {
597
593
  type: String,
598
- "default": '确定'
594
+ "default": ''
599
595
  },
600
596
  closeBtnText: {
601
597
  type: String,
602
- "default": '关闭'
598
+ "default": ''
603
599
  },
604
600
  modalTitle: String,
605
601
  handleIcon: {
@@ -933,18 +929,18 @@
933
929
  "onClick": function onClick() {
934
930
  return _this8.onCancel() !== false && (_this8.frameVisible = false);
935
931
  }
936
- }, _isSlot(closeBtnText) ? closeBtnText : {
932
+ }, {
937
933
  "default": function _default() {
938
- return [closeBtnText];
934
+ return [closeBtnText || _this8.formCreateInject.t('close') || '关闭'];
939
935
  }
940
936
  }) : null, okBtn ? vue.createVNode(vue.resolveComponent("ElButton"), {
941
937
  "type": "primary",
942
938
  "onClick": function onClick() {
943
939
  return _this8.onOk() !== false && _this8.closeModel();
944
940
  }
945
- }, _isSlot(okBtnText) ? okBtnText : {
941
+ }, {
946
942
  "default": function _default() {
947
- return [okBtnText];
943
+ return [okBtnText || _this8.formCreateInject.t('ok') || '确定'];
948
944
  }
949
945
  }) : null]);
950
946
  }
@@ -1416,8 +1412,10 @@
1416
1412
  props: {
1417
1413
  previewMask: undefined,
1418
1414
  onPreview: Function,
1415
+ httpRequest: Function,
1419
1416
  modalTitle: String,
1420
1417
  listType: String,
1418
+ formCreateInject: Object,
1421
1419
  modelValue: [Array, String, Object]
1422
1420
  },
1423
1421
  emits: ['update:modelValue', 'change', 'remove', 'fc.el'],
@@ -1470,6 +1468,14 @@
1470
1468
  handleRemove: function handleRemove(file, fileList) {
1471
1469
  this.$emit.apply(this, ['remove'].concat(Array.prototype.slice.call(arguments)));
1472
1470
  this.update(fileList);
1471
+ },
1472
+ doHttpRequest: function doHttpRequest(option) {
1473
+ if (this.httpRequest) {
1474
+ return this.httpRequest(option);
1475
+ } else {
1476
+ option.source = 'upload';
1477
+ this.formCreateInject.api.fetch(option);
1478
+ }
1473
1479
  }
1474
1480
  },
1475
1481
  render: function render() {
@@ -1490,6 +1496,7 @@
1490
1496
  "onPreview": this.handlePreview,
1491
1497
  "onChange": this.handleChange,
1492
1498
  "onRemove": this.handleRemove,
1499
+ "httpRequest": this.doHttpRequest,
1493
1500
  "fileList": this.fileList,
1494
1501
  "ref": "upload"
1495
1502
  }), _objectSpread2({
@@ -1502,7 +1509,7 @@
1502
1509
  "type": "primary"
1503
1510
  }, {
1504
1511
  "default": function _default() {
1505
- return [vue.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")];
1512
+ return [_this.formCreateInject.t('clickToUpload') || '点击上传'];
1506
1513
  }
1507
1514
  }))];
1508
1515
  }
@@ -1780,6 +1787,7 @@
1780
1787
  return;
1781
1788
  }
1782
1789
 
1790
+ this.cacheRule[key].$f && this.cacheRule[key].$f.setValue(value);
1783
1791
  this.cache(key, value);
1784
1792
  },
1785
1793
  addRule: function addRule(i, emit) {
@@ -2516,7 +2524,7 @@
2516
2524
 
2517
2525
  var keyAttrs = ['type', 'slot', 'ignore', 'emitPrefix', 'value', 'name', 'native', 'hidden', 'display', 'inject', 'options', 'emit', 'link', 'prefix', 'suffix', 'update', 'sync', 'optionsTo', 'key', 'slotUpdate', 'computed', 'preview', 'component', 'cache', 'modelEmit'];
2518
2526
  var arrayAttrs = ['validate', 'children', 'control'];
2519
- var normalAttrs = ['effect', 'deep'];
2527
+ var normalAttrs = ['effect', 'deep', 'renderSlots'];
2520
2528
  function attrs() {
2521
2529
  return [].concat(keyAttrs, _toConsumableArray(normalMerge), _toConsumableArray(toArrayMerge), _toConsumableArray(functionalMerge), arrayAttrs, normalAttrs);
2522
2530
  }
@@ -3003,6 +3011,13 @@
3003
3011
  var xhr = new XMLHttpRequest();
3004
3012
  var action = option.action || '';
3005
3013
 
3014
+ if (xhr.upload && option.onProgress) {
3015
+ xhr.upload.addEventListener('progress', function (evt) {
3016
+ evt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0;
3017
+ option.onProgress(evt);
3018
+ });
3019
+ }
3020
+
3006
3021
  if (option.query) {
3007
3022
  var queryString = new URLSearchParams(option.query).toString();
3008
3023
 
@@ -3028,18 +3043,22 @@
3028
3043
  xhr.open(option.method || 'get', action, true);
3029
3044
  var formData;
3030
3045
 
3031
- if (option.data) {
3032
- if ((option.dataType || '').toLowerCase() !== 'json') {
3046
+ if (option.data || option.file) {
3047
+ if (option.file || (option.dataType || '').toLowerCase() !== 'json') {
3033
3048
  formData = new FormData();
3034
- Object.keys(option.data).map(function (key) {
3049
+ Object.keys(option.data || {}).map(function (key) {
3035
3050
  formData.append(key, option.data[key]);
3036
3051
  });
3037
3052
  } else {
3038
- formData = JSON.stringify(option.data);
3053
+ formData = JSON.stringify(option.data || {});
3039
3054
  xhr.setRequestHeader('content-type', 'application/json');
3040
3055
  }
3041
3056
  }
3042
3057
 
3058
+ if (option.file) {
3059
+ formData.append(option.filename, option.file, option.file.name);
3060
+ }
3061
+
3043
3062
  if (option.withCredentials && 'withCredentials' in xhr) {
3044
3063
  xhr.withCredentials = true;
3045
3064
  }
@@ -3506,7 +3525,11 @@
3506
3525
  });
3507
3526
  });
3508
3527
  vue.nextTick(function () {
3509
- api.clearValidateState();
3528
+ vue.nextTick(function () {
3529
+ vue.nextTick(function () {
3530
+ api.clearValidateState(fields);
3531
+ });
3532
+ });
3510
3533
  });
3511
3534
 
3512
3535
  if (fields == null) {
@@ -3900,7 +3923,7 @@
3900
3923
  if (!this.cacheConfig[ctx.trueType]) {
3901
3924
  this.cacheConfig[ctx.trueType] = vue.computed(function () {
3902
3925
  var g = _this2.$handle.options.global;
3903
- return mergeRule({}, [g['*'], g[ctx.originType] || g[ctx.type] || g[ctx.type] || {}]);
3926
+ return mergeRule({}, [g['*'] || g["default"] || {}, g[ctx.originType] || g[ctx.type] || g[ctx.type] || {}]);
3904
3927
  });
3905
3928
  }
3906
3929
 
@@ -4002,6 +4025,14 @@
4002
4025
  children = _this4.renderChildren(_load, ctx);
4003
4026
  }
4004
4027
 
4028
+ Object.keys(prop.renderSlots || {}).forEach(function (key) {
4029
+ children[key] = function () {
4030
+ var rule = _this4.parseSide(prop.renderSlots[key], ctx);
4031
+
4032
+ return _this4.renderRule(rule);
4033
+ };
4034
+ });
4035
+
4005
4036
  var slot = _this4.getTypeSlot(ctx);
4006
4037
 
4007
4038
  var _vn;
@@ -4123,6 +4154,11 @@
4123
4154
  field: ctx.field,
4124
4155
  rule: ctx.rule,
4125
4156
  input: ctx.input,
4157
+ t: function t() {
4158
+ var _this6$$handle$api;
4159
+
4160
+ return (_this6$$handle$api = _this6.$handle.api).t.apply(_this6$$handle$api, arguments);
4161
+ },
4126
4162
  updateValue: function updateValue(data) {
4127
4163
  _this6.$handle.onUpdateValue(ctx, data);
4128
4164
  }
@@ -4474,24 +4510,16 @@
4474
4510
  return _this4.loadStrVar(str, get);
4475
4511
  };
4476
4512
 
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
-
4513
+ options.action = loadVal(options.action || '');
4514
+ ['headers', 'data', 'query'].forEach(function (key) {
4515
+ if (options[key]) {
4516
+ var data = {};
4517
+ Object.keys(options[key]).forEach(function (k) {
4518
+ data[loadVal(k)] = loadVal(options[key][k]);
4519
+ });
4520
+ options[key] = data;
4521
+ }
4522
+ });
4495
4523
  return options;
4496
4524
  }
4497
4525
  });
@@ -4760,7 +4788,9 @@
4760
4788
  parser.init(this);
4761
4789
  },
4762
4790
  initProp: function initProp() {
4763
- var _this3 = this;
4791
+ var _this3 = this,
4792
+ _this$refRule,
4793
+ _this$refRule$__$vali;
4764
4794
 
4765
4795
  var rule = _objectSpread2({}, this.rule);
4766
4796
 
@@ -4769,7 +4799,7 @@
4769
4799
  this.prop = mergeRule({}, [rule].concat(_toConsumableArray(Object.keys(this.payload).map(function (k) {
4770
4800
  return _this3.payload[k];
4771
4801
  })), [this.computed]));
4772
- this.prop.validate = [].concat(_toConsumableArray(this.refRule.__$validate.value || []), _toConsumableArray(this.prop.validate || []));
4802
+ this.prop.validate = [].concat(_toConsumableArray(((_this$refRule = this.refRule) === null || _this$refRule === void 0 ? void 0 : (_this$refRule$__$vali = _this$refRule.__$validate) === null || _this$refRule$__$vali === void 0 ? void 0 : _this$refRule$__$vali.value) || []), _toConsumableArray(this.prop.validate || []));
4773
4803
  },
4774
4804
  initNone: function initNone() {
4775
4805
  this.none = !(is.Undef(this.prop.display) || !!this.prop.display);
@@ -5338,6 +5368,8 @@
5338
5368
  function useInput(Handler) {
5339
5369
  extend(Handler.prototype, {
5340
5370
  setValue: function setValue(ctx, value, formValue, setFlag) {
5371
+ var _this = this;
5372
+
5341
5373
  if (ctx.deleted) return;
5342
5374
  ctx.rule.value = value;
5343
5375
  this.changeStatus = true;
@@ -5356,6 +5388,16 @@
5356
5388
  api: this.api,
5357
5389
  setFlag: setFlag || false
5358
5390
  });
5391
+
5392
+ if (setFlag) {
5393
+ vue.nextTick(function () {
5394
+ vue.nextTick(function () {
5395
+ vue.nextTick(function () {
5396
+ _this.api.clearValidateState(ctx.id);
5397
+ });
5398
+ });
5399
+ });
5400
+ }
5359
5401
  },
5360
5402
  onInput: function onInput(ctx, value) {
5361
5403
  var val;
@@ -5365,24 +5407,24 @@
5365
5407
  }
5366
5408
  },
5367
5409
  onUpdateValue: function onUpdateValue(ctx, data) {
5368
- var _this = this;
5410
+ var _this2 = this;
5369
5411
 
5370
5412
  this.deferSyncValue(function () {
5371
5413
  var group = ctx.getParentGroup();
5372
- var subForm = group ? _this.subRuleData[group.id] : null;
5414
+ var subForm = group ? _this2.subRuleData[group.id] : null;
5373
5415
  var subData = {};
5374
5416
  Object.keys(data || {}).forEach(function (k) {
5375
5417
  if (subForm && hasProperty(subForm, k)) {
5376
5418
  subData[k] = data[k];
5377
- } else if (hasProperty(_this.api.form, k)) {
5378
- _this.api.form[k] = data[k];
5379
- } else if (_this.api.top !== _this.api && hasProperty(_this.api.top.form, k)) {
5380
- _this.api.top.form[k] = data[k];
5419
+ } else if (hasProperty(_this2.api.form, k)) {
5420
+ _this2.api.form[k] = data[k];
5421
+ } else if (_this2.api.top !== _this2.api && hasProperty(_this2.api.top.form, k)) {
5422
+ _this2.api.top.form[k] = data[k];
5381
5423
  }
5382
5424
  });
5383
5425
 
5384
5426
  if (Object.keys(subData).length) {
5385
- _this.api.setChildrenFormData(group.rule, subData);
5427
+ _this2.api.setChildrenFormData(group.rule, subData);
5386
5428
  }
5387
5429
  });
5388
5430
  },
@@ -5417,7 +5459,7 @@
5417
5459
  return this.formData[ctx.id];
5418
5460
  },
5419
5461
  syncForm: function syncForm() {
5420
- var _this2 = this;
5462
+ var _this3 = this;
5421
5463
 
5422
5464
  var data = vue.reactive({});
5423
5465
  var fields = this.fields();
@@ -5426,7 +5468,7 @@
5426
5468
  if (this.options.appendValue !== false) {
5427
5469
  Object.keys(this.appendData).reduce(function (initial, field) {
5428
5470
  if (fields.indexOf(field) === -1) {
5429
- initial[field] = vue.toRef(_this2.appendData, field);
5471
+ initial[field] = vue.toRef(_this3.appendData, field);
5430
5472
  }
5431
5473
 
5432
5474
  return initial;
@@ -5434,11 +5476,11 @@
5434
5476
  }
5435
5477
 
5436
5478
  fields.reduce(function (initial, field) {
5437
- var ctx = (_this2.fieldCtx[field] || []).filter(function (ctx) {
5438
- return !_this2.isIgnore(ctx.rule);
5439
- })[0] || _this2.fieldCtx[field][0];
5479
+ var ctx = (_this3.fieldCtx[field] || []).filter(function (ctx) {
5480
+ return !_this3.isIgnore(ctx.rule);
5481
+ })[0] || _this3.fieldCtx[field][0];
5440
5482
 
5441
- if (_this2.isIgnore(ctx.rule)) {
5483
+ if (_this3.isIgnore(ctx.rule)) {
5442
5484
  ignoreFields.push(field);
5443
5485
  }
5444
5486
 
@@ -5483,7 +5525,7 @@
5483
5525
  }
5484
5526
  },
5485
5527
  syncValue: function syncValue() {
5486
- var _this3 = this;
5528
+ var _this4 = this;
5487
5529
 
5488
5530
  if (this.deferSyncFn) {
5489
5531
  return this.deferSyncFn.sync = true;
@@ -5491,8 +5533,8 @@
5491
5533
 
5492
5534
  var data = {};
5493
5535
  Object.keys(this.form).forEach(function (k) {
5494
- if (_this3.ignoreFields.indexOf(k) === -1) {
5495
- data[k] = _this3.form[k];
5536
+ if (_this4.ignoreFields.indexOf(k) === -1) {
5537
+ data[k] = _this4.form[k];
5496
5538
  }
5497
5539
  });
5498
5540
  this.vm.setupState.updateValue(data);
@@ -5504,11 +5546,11 @@
5504
5546
  return (is.Object(value) || Array.isArray(value)) && value === ctx.rule.value;
5505
5547
  },
5506
5548
  refreshUpdate: function refreshUpdate(ctx, val, origin, field) {
5507
- var _this4 = this;
5549
+ var _this5 = this;
5508
5550
 
5509
5551
  if (is.Function(ctx.rule.update)) {
5510
5552
  var state = invoke(function () {
5511
- return ctx.rule.update(val, ctx.origin, _this4.api, {
5553
+ return ctx.rule.update(val, ctx.origin, _this5.api, {
5512
5554
  origin: origin || 'change',
5513
5555
  linkField: field
5514
5556
  });
@@ -5532,18 +5574,18 @@
5532
5574
  this.refreshUpdate(ctx, val, origin, field);
5533
5575
  },
5534
5576
  appendLink: function appendLink(ctx) {
5535
- var _this5 = this;
5577
+ var _this6 = this;
5536
5578
 
5537
5579
  var link = ctx.rule.link;
5538
5580
  is.trueArray(link) && link.forEach(function (field) {
5539
5581
  var fn = function fn() {
5540
- return _this5.refreshRule(ctx, ctx.rule.value, 'link', field);
5582
+ return _this6.refreshRule(ctx, ctx.rule.value, 'link', field);
5541
5583
  };
5542
5584
 
5543
- _this5.bus.$on('change-' + field, fn);
5585
+ _this6.bus.$on('change-' + field, fn);
5544
5586
 
5545
5587
  ctx.linkOn.push(function () {
5546
- return _this5.bus.$off('change-' + field, fn);
5588
+ return _this6.bus.$off('change-' + field, fn);
5547
5589
  });
5548
5590
  });
5549
5591
  },
@@ -6616,7 +6658,7 @@
6616
6658
  var loadData = {
6617
6659
  name: 'loadData',
6618
6660
  _fn: [],
6619
- mounted: function mounted(inject, rule, api) {
6661
+ loaded: function loaded(inject, rule, api) {
6620
6662
  this.deleted(inject);
6621
6663
  var attrs = toArray(inject.getValue());
6622
6664
  var unwatchs = [];
@@ -6627,6 +6669,8 @@
6627
6669
 
6628
6670
  if (attr.template) {
6629
6671
  value = fc.$handle.loadStrVar(attr.template, get);
6672
+ } else if (attr.handler && is.Function(attr.handler)) {
6673
+ value = attr.handler(get, rule, api);
6630
6674
  } else {
6631
6675
  value = get(attr.attr, attr["default"]);
6632
6676
  }
@@ -6931,7 +6975,7 @@
6931
6975
  var fetchAttr = {
6932
6976
  name: 'fetch',
6933
6977
  _fn: [],
6934
- mounted: function mounted() {
6978
+ loaded: function loaded() {
6935
6979
  run.apply(void 0, arguments);
6936
6980
  },
6937
6981
  watch: function watch() {
@@ -7016,6 +7060,20 @@
7016
7060
  return null;
7017
7061
  }
7018
7062
 
7063
+ function getSessionStorage(name) {
7064
+ var value = sessionStorage.getItem(name);
7065
+
7066
+ if (value) {
7067
+ try {
7068
+ return JSON.parse(value);
7069
+ } catch (e) {
7070
+ return value;
7071
+ }
7072
+ }
7073
+
7074
+ return null;
7075
+ }
7076
+
7019
7077
  function baseDriver(driver, name) {
7020
7078
  if (!name) {
7021
7079
  return null;
@@ -7040,6 +7098,9 @@
7040
7098
  function localStorageDriver(name) {
7041
7099
  return baseDriver(getLocalStorage, name);
7042
7100
  }
7101
+ function sessionStorageDriver(name) {
7102
+ return baseDriver(getSessionStorage, name);
7103
+ }
7043
7104
 
7044
7105
  function parseProp(name, id) {
7045
7106
  var prop;
@@ -7440,10 +7501,6 @@
7440
7501
  t: function t(id, params, get) {
7441
7502
  var value = get ? get('$t.' + id) : this.globalLanguageDriver(id);
7442
7503
 
7443
- if (value == null && this.vm.appContext.config.globalProperties.$i18n) {
7444
- return this.vm.appContext.config.globalProperties.$i18n.t(id, params);
7445
- }
7446
-
7447
7504
  if (value == null) {
7448
7505
  value = '';
7449
7506
  }
@@ -7551,10 +7608,6 @@
7551
7608
  return locale;
7552
7609
  }
7553
7610
 
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
7611
  return 'zh-cn';
7559
7612
  },
7560
7613
  globalLanguageDriver: function globalLanguageDriver(id) {
@@ -7583,7 +7636,7 @@
7583
7636
  var option = this.options.value.globalVariable && this.options.value.globalVariable[key];
7584
7637
 
7585
7638
  if (option) {
7586
- var handle = is.Function(option) ? option : option.handle;
7639
+ var handle = is.Function(option) ? option : parseFn(option.handle);
7587
7640
 
7588
7641
  if (handle) {
7589
7642
  return deepGet(invoke(function () {
@@ -7870,6 +7923,7 @@
7870
7923
  useStatic(prototype);
7871
7924
  setDataDriver('$cookie', cookieDriver);
7872
7925
  setDataDriver('$localStorage', localStorageDriver);
7926
+ setDataDriver('$sessionStorage', sessionStorageDriver);
7873
7927
  CreateNode.use({
7874
7928
  fragment: 'fcFragment'
7875
7929
  });
@@ -8101,7 +8155,7 @@
8101
8155
  type: 'primary',
8102
8156
  loading: false,
8103
8157
  disabled: false,
8104
- innerText: '提交',
8158
+ innerText: '',
8105
8159
  show: true,
8106
8160
  col: undefined,
8107
8161
  click: undefined
@@ -8110,7 +8164,7 @@
8110
8164
  type: 'default',
8111
8165
  loading: false,
8112
8166
  disabled: false,
8113
- innerText: '重置',
8167
+ innerText: '',
8114
8168
  show: false,
8115
8169
  col: undefined,
8116
8170
  click: undefined
@@ -8297,7 +8351,9 @@
8297
8351
  return !(!title.title && !title["native"] || isFalse(title.show));
8298
8352
  },
8299
8353
  makeInfo: function makeInfo(rule, uni, ctx) {
8300
- var _this5 = this;
8354
+ var _ctx$refRule,
8355
+ _ctx$refRule2,
8356
+ _this5 = this;
8301
8357
 
8302
8358
  var titleProp = _objectSpread2({}, rule.title);
8303
8359
 
@@ -8307,10 +8363,10 @@
8307
8363
  var form = this.options.form;
8308
8364
  var titleSlot = this.getSlot('title');
8309
8365
  var children = [titleSlot ? titleSlot({
8310
- title: ctx.refRule.__$title.value,
8366
+ title: (_ctx$refRule = ctx.refRule) === null || _ctx$refRule === void 0 ? void 0 : _ctx$refRule.__$title.value,
8311
8367
  rule: ctx.rule,
8312
8368
  options: this.options
8313
- }) : ctx.refRule.__$title.value + (form.labelSuffix || form['label-suffix'] || '')];
8369
+ }) : ((_ctx$refRule2 = ctx.refRule) === null || _ctx$refRule2 === void 0 ? void 0 : _ctx$refRule2.__$title.value) + (form.labelSuffix || form['label-suffix'] || '')];
8314
8370
 
8315
8371
  if (!isFalse(infoProp.show) && (infoProp.info || infoProp["native"]) && !isFalse(infoProp.icon)) {
8316
8372
  var prop = {
@@ -8326,7 +8382,9 @@
8326
8382
  var field = 'content';
8327
8383
 
8328
8384
  if (infoProp.info && !hasProperty(prop.props, field)) {
8329
- prop.props[field] = ctx.refRule.__$info.value;
8385
+ var _ctx$refRule3;
8386
+
8387
+ prop.props[field] = (_ctx$refRule3 = ctx.refRule) === null || _ctx$refRule3 === void 0 ? void 0 : _ctx$refRule3.__$info.value;
8330
8388
  }
8331
8389
 
8332
8390
  children[infoProp.align !== 'left' ? 'unshift' : 'push'](this.$r(mergeProps([infoProp, prop]), _defineProperty({}, titleProp.slot || (isTip ? 'default' : 'reference'), function () {
@@ -8410,7 +8468,7 @@
8410
8468
 
8411
8469
  var resetBtn = _objectSpread2({}, this.options.resetBtn);
8412
8470
 
8413
- var innerText = resetBtn.innerText;
8471
+ var innerText = resetBtn.innerText || this.$handle.api.t('reset') || '重置';
8414
8472
  delete resetBtn.innerText;
8415
8473
  delete resetBtn.click;
8416
8474
  delete resetBtn.col;
@@ -8436,7 +8494,7 @@
8436
8494
 
8437
8495
  var submitBtn = _objectSpread2({}, this.options.submitBtn);
8438
8496
 
8439
- var innerText = submitBtn.innerText;
8497
+ var innerText = submitBtn.innerText || this.$handle.api.t('submit') || '提交';
8440
8498
  delete submitBtn.innerText;
8441
8499
  delete submitBtn.click;
8442
8500
  delete submitBtn.col;
@@ -8732,14 +8790,18 @@
8732
8790
  }
8733
8791
  }, val);
8734
8792
 
8793
+ var title = rule.__fc__.refRule.__$title.value;
8794
+
8735
8795
  if (!validate.message) {
8736
- validate.message = rule.__fc__.refRule.__$title.value + (api.getLocale() === 'en' ? ' is required' : '不能为空');
8796
+ validate.message = api.t('required', {
8797
+ title: title
8798
+ }) || title + (api.getLocale() === 'en' ? ' is required' : '不能为空');
8737
8799
  } else {
8738
8800
  var match = validate.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
8739
8801
 
8740
8802
  if (match) {
8741
8803
  validate.message = api.t(match[1], {
8742
- title: rule.__fc__.refRule.__$title.value
8804
+ title: title
8743
8805
  });
8744
8806
  }
8745
8807
  }
@@ -8801,7 +8863,7 @@
8801
8863
  function elmFormCreate() {
8802
8864
  return FormCreateFactory({
8803
8865
  ui: 'element-ui',
8804
- version: '3.2.16',
8866
+ version: '3.2.18',
8805
8867
  manager: manager,
8806
8868
  extendApi: extendApi,
8807
8869
  install: install,