@form-create/element-ui 3.2.17 → 3.2.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@form-create/element-ui",
3
- "version": "3.2.17",
3
+ "version": "3.2.19",
4
4
  "description": "Element Plus版本低代码表单|FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。",
5
5
  "main": "./dist/form-create.min.js",
6
6
  "module": "./dist/form-create.esm.js",
@@ -46,16 +46,16 @@
46
46
  },
47
47
  "homepage": "http://www.form-create.com/v3/",
48
48
  "dependencies": {
49
- "@form-create/component-elm-checkbox": "^3.2.15",
50
- "@form-create/component-elm-frame": "^3.2.15",
51
- "@form-create/component-elm-group": "^3.2.15",
52
- "@form-create/component-elm-radio": "^3.2.15",
53
- "@form-create/component-elm-select": "^3.2.15",
54
- "@form-create/component-elm-tree": "^3.2.15",
55
- "@form-create/component-elm-upload": "^3.2.15",
49
+ "@form-create/component-elm-checkbox": "^3.2.18",
50
+ "@form-create/component-elm-frame": "^3.2.18",
51
+ "@form-create/component-elm-group": "^3.2.19",
52
+ "@form-create/component-elm-radio": "^3.2.18",
53
+ "@form-create/component-elm-select": "^3.2.18",
54
+ "@form-create/component-elm-tree": "^3.2.18",
55
+ "@form-create/component-elm-upload": "^3.2.18",
56
56
  "@form-create/component-subform": "^3.1.34",
57
- "@form-create/core": "^3.2.17",
58
- "@form-create/utils": "^3.2.15"
57
+ "@form-create/core": "^3.2.19",
58
+ "@form-create/utils": "^3.2.18"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"
@@ -88,5 +88,5 @@
88
88
  "esm"
89
89
  ]
90
90
  },
91
- "gitHead": "bef54d6d2d2a9980c3afd324f97204ce19e1efb6"
91
+ "gitHead": "7f6e8182998699e87103b58f2f9afa00044dd205"
92
92
  }
@@ -15,7 +15,7 @@ export default function getConfig() {
15
15
  type: 'primary',
16
16
  loading: false,
17
17
  disabled: false,
18
- innerText: '提交',
18
+ innerText: '',
19
19
  show: true,
20
20
  col: undefined,
21
21
  click: undefined,
@@ -24,7 +24,7 @@ export default function getConfig() {
24
24
  type: 'default',
25
25
  loading: false,
26
26
  disabled: false,
27
- innerText: '重置',
27
+ innerText: '',
28
28
  show: false,
29
29
  col: undefined,
30
30
  click: undefined,
@@ -149,10 +149,10 @@ export default {
149
149
  const form = this.options.form;
150
150
  const titleSlot = this.getSlot('title');
151
151
  const children = [titleSlot ? titleSlot({
152
- title: ctx.refRule.__$title.value,
152
+ title: ctx.refRule?.__$title.value,
153
153
  rule: ctx.rule,
154
154
  options: this.options
155
- }) : ((ctx.refRule.__$title.value) + (form.labelSuffix || form['label-suffix'] || ''))];
155
+ }) : ((ctx.refRule?.__$title.value) + (form.labelSuffix || form['label-suffix'] || ''))];
156
156
 
157
157
  if (!isFalse(infoProp.show) && (infoProp.info || infoProp.native) && !isFalse(infoProp.icon)) {
158
158
  const prop = {
@@ -169,7 +169,7 @@ export default {
169
169
 
170
170
  const field = 'content';
171
171
  if (infoProp.info && !hasProperty(prop.props, field)) {
172
- prop.props[field] = ctx.refRule.__$info.value;
172
+ prop.props[field] = ctx.refRule?.__$info.value;
173
173
  }
174
174
 
175
175
  children[infoProp.align !== 'left' ? 'unshift' : 'push'](this.$r(mergeProps([infoProp, prop]), {
@@ -244,7 +244,7 @@ export default {
244
244
 
245
245
  makeResetBtn() {
246
246
  const resetBtn = {...this.options.resetBtn};
247
- const innerText = resetBtn.innerText;
247
+ const innerText = resetBtn.innerText || this.$handle.api.t('reset') || '重置';
248
248
  delete resetBtn.innerText;
249
249
  delete resetBtn.click;
250
250
  delete resetBtn.col;
@@ -267,7 +267,7 @@ export default {
267
267
  },
268
268
  makeSubmitBtn() {
269
269
  const submitBtn = {...this.options.submitBtn};
270
- const innerText = submitBtn.innerText;
270
+ const innerText = submitBtn.innerText || this.$handle.api.t('submit') || '提交';
271
271
  delete submitBtn.innerText;
272
272
  delete submitBtn.click;
273
273
  delete submitBtn.col;
@@ -15,12 +15,13 @@ const required = {
15
15
  },
16
16
  ...val,
17
17
  };
18
+ const title = rule.__fc__.refRule.__$title.value;
18
19
  if (!validate.message) {
19
- validate.message = rule.__fc__.refRule.__$title.value + (api.getLocale() === 'en' ? ' is required' : '不能为空');
20
+ validate.message = api.t('required', {title}) || (title + (api.getLocale() === 'en' ? ' is required' : '不能为空'));
20
21
  } else {
21
22
  const match = validate.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
22
23
  if (match) {
23
- validate.message = api.t(match[1], {title: rule.__fc__.refRule.__$title.value});
24
+ validate.message = api.t(match[1], {title});
24
25
  }
25
26
  }
26
27
  inject.getProp().validate = [validate];