@form-create/element-ui 2.7.0 → 2.7.2

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,20 +1,12 @@
1
1
  {
2
2
  "name": "@form-create/element-ui",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "Element UI版本低代码表单|FormCreate 是一个可以通过 JSON 生成具有动态渲染、数据收集、验证和提交功能的低代码表单生成组件。支持6个UI框架,适配移动端,并且支持生成任何 Vue 组件。内置20种常用表单组件和自定义组件,再复杂的表单都可以轻松搞定。",
5
5
  "main": "./dist/form-create.min.js",
6
6
  "module": "./dist/form-create.esm.js",
7
7
  "unpkg": "./dist/form-create.min.js",
8
8
  "jsdelivr": "./dist/form-create.min.js",
9
9
  "typings": "./types/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "import": "./dist/form-create.esm.js",
13
- "types": "./types/index.d.ts",
14
- "require": "./dist/form-create.min.js"
15
- },
16
- "./*": "./*"
17
- },
18
10
  "scripts": {
19
11
  "clean": "rimraf dist/",
20
12
  "build:lib": "npm-run-all clean build:lib:vite",
@@ -52,26 +44,26 @@
52
44
  },
53
45
  "homepage": "http://www.form-create.com",
54
46
  "dependencies": {
55
- "@form-create/component-elm-checkbox": "^2.7.0",
56
- "@form-create/component-elm-frame": "^2.7.0",
57
- "@form-create/component-elm-group": "^2.7.0",
58
- "@form-create/component-elm-radio": "^2.7.0",
59
- "@form-create/component-elm-select": "^2.7.0",
60
- "@form-create/component-elm-tree": "^2.7.0",
61
- "@form-create/component-elm-upload": "^2.7.0",
62
- "@form-create/component-subform": "^2.7.0",
63
- "@form-create/core": "^2.7.0",
47
+ "@form-create/component-elm-checkbox": "^2.7.1",
48
+ "@form-create/component-elm-frame": "^2.7.2",
49
+ "@form-create/component-elm-group": "^2.7.1",
50
+ "@form-create/component-elm-radio": "^2.7.1",
51
+ "@form-create/component-elm-select": "^2.7.1",
52
+ "@form-create/component-elm-tree": "^2.7.1",
53
+ "@form-create/component-elm-upload": "^2.7.2",
54
+ "@form-create/component-subform": "^2.7.1",
55
+ "@form-create/core": "^2.7.2",
64
56
  "@form-create/utils": "^2.7.0"
65
57
  },
66
58
  "publishConfig": {
67
59
  "access": "public"
68
60
  },
69
61
  "devDependencies": {
70
- "@form-create/component-wangeditor": "^2.7.0",
62
+ "@form-create/component-wangeditor": "^2.7.1",
71
63
  "element-ui": "^2.15.9",
72
64
  "rimraf": "^6.0.1",
73
65
  "v-jsoneditor": "^1.4.2",
74
66
  "vue": "2.7"
75
67
  },
76
- "gitHead": "8f8c60295578719d0a903e6ac00f4f3641f0424e"
68
+ "gitHead": "de01d8a789a38d0b761d5eb1ac18ab90bc85d936"
77
69
  }
@@ -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,
@@ -25,7 +25,7 @@ export default function getConfig() {
25
25
  loading: false,
26
26
  disabled: false,
27
27
  icon: 'el-icon-refresh',
28
- innerText: '重置',
28
+ innerText: '',
29
29
  show: false,
30
30
  col: undefined,
31
31
  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 = {
@@ -170,7 +170,7 @@ export default {
170
170
 
171
171
  const field = 'content';
172
172
  if (infoProp.info && !hasProperty(prop.props, field)) {
173
- prop.props[field] = ctx.refRule.__$info.value;
173
+ prop.props[field] = ctx.refRule?.__$info.value;
174
174
  }
175
175
  children[infoProp.align !== 'left' ? 'unshift' : 'push'](this.$r(mergeProps([infoProp, prop]), [
176
176
  this.$r({
@@ -242,7 +242,7 @@ export default {
242
242
 
243
243
  makeResetBtn() {
244
244
  const resetBtn = {...this.options.resetBtn};
245
- const innerText = resetBtn.innerText;
245
+ const innerText = resetBtn.innerText || this.$handle.api.t('reset') || '重置';
246
246
  delete resetBtn.innerText;
247
247
  delete resetBtn.click;
248
248
  delete resetBtn.col;
@@ -265,7 +265,7 @@ export default {
265
265
  },
266
266
  makeSubmitBtn() {
267
267
  const submitBtn = {...this.options.submitBtn};
268
- const innerText = submitBtn.innerText;
268
+ const innerText = submitBtn.innerText || this.$handle.api.t('submit') || '提交';
269
269
  delete submitBtn.innerText;
270
270
  delete submitBtn.click;
271
271
  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];