@form-create/iview 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/dist/form-create.esm.js +632 -594
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +12 -20
- package/src/core/config.js +2 -2
- package/src/core/manager.js +5 -5
- package/src/core/provider.js +3 -2
package/package.json
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@form-create/iview",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "Iview版本低代码表单|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,25 +44,25 @@
|
|
|
52
44
|
},
|
|
53
45
|
"homepage": "http://www.form-create.com",
|
|
54
46
|
"dependencies": {
|
|
55
|
-
"@form-create/component-ivu-checkbox": "^2.7.
|
|
56
|
-
"@form-create/component-ivu-frame": "^2.7.
|
|
57
|
-
"@form-create/component-ivu-group": "^2.7.
|
|
58
|
-
"@form-create/component-ivu-radio": "^2.7.
|
|
59
|
-
"@form-create/component-ivu-select": "^2.7.
|
|
60
|
-
"@form-create/component-ivu-tree": "^2.7.
|
|
61
|
-
"@form-create/component-ivu-upload": "^2.7.
|
|
62
|
-
"@form-create/component-subform": "^2.7.
|
|
63
|
-
"@form-create/core": "^2.7.
|
|
47
|
+
"@form-create/component-ivu-checkbox": "^2.7.1",
|
|
48
|
+
"@form-create/component-ivu-frame": "^2.7.2",
|
|
49
|
+
"@form-create/component-ivu-group": "^2.7.1",
|
|
50
|
+
"@form-create/component-ivu-radio": "^2.7.1",
|
|
51
|
+
"@form-create/component-ivu-select": "^2.7.1",
|
|
52
|
+
"@form-create/component-ivu-tree": "^2.7.1",
|
|
53
|
+
"@form-create/component-ivu-upload": "^2.7.1",
|
|
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.
|
|
62
|
+
"@form-create/component-wangeditor": "^2.7.1",
|
|
71
63
|
"iview": "^3.3.3",
|
|
72
64
|
"v-jsoneditor": "^1.4.2",
|
|
73
65
|
"vue": "2.7"
|
|
74
66
|
},
|
|
75
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "de01d8a789a38d0b761d5eb1ac18ab90bc85d936"
|
|
76
68
|
}
|
package/src/core/config.js
CHANGED
|
@@ -30,7 +30,7 @@ export default function getConfig() {
|
|
|
30
30
|
submitBtn: {
|
|
31
31
|
type: 'primary',
|
|
32
32
|
disabled: false,
|
|
33
|
-
innerText: '
|
|
33
|
+
innerText: '',
|
|
34
34
|
loading: false,
|
|
35
35
|
show: true,
|
|
36
36
|
click: undefined,
|
|
@@ -39,7 +39,7 @@ export default function getConfig() {
|
|
|
39
39
|
type: iviewConfig.resetBtnType,
|
|
40
40
|
disabled: false,
|
|
41
41
|
icon: iviewConfig.resetBtnIcon,
|
|
42
|
-
innerText: '
|
|
42
|
+
innerText: '',
|
|
43
43
|
loading: false,
|
|
44
44
|
show: false,
|
|
45
45
|
click: undefined,
|
package/src/core/manager.js
CHANGED
|
@@ -146,10 +146,10 @@ export default {
|
|
|
146
146
|
const form = this.options.form;
|
|
147
147
|
const titleSlot = this.getSlot('title');
|
|
148
148
|
const children = [titleSlot ? titleSlot({
|
|
149
|
-
title: ctx.refRule
|
|
149
|
+
title: ctx.refRule?.__$title.value,
|
|
150
150
|
rule: ctx.rule,
|
|
151
151
|
options: this.options
|
|
152
|
-
}) : ((ctx.refRule
|
|
152
|
+
}) : ((ctx.refRule?.__$title.value) + (form.labelSuffix || form['label-suffix'] || ''))];
|
|
153
153
|
|
|
154
154
|
if (!isFalse(infoProp.show) && (infoProp.info || infoProp.native) && !isFalse(infoProp.icon)) {
|
|
155
155
|
const prop = {
|
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
|
|
168
168
|
const field = 'content';
|
|
169
169
|
if (infoProp.info && !hasProperty(prop.props, field)) {
|
|
170
|
-
prop.props[field] = ctx.refRule
|
|
170
|
+
prop.props[field] = ctx.refRule?.__$info.value;
|
|
171
171
|
}
|
|
172
172
|
children[infoProp.align !== 'left' ? 'unshift' : 'push'](this.$r(mergeProps([infoProp, prop]), [
|
|
173
173
|
this.$r({
|
|
@@ -239,7 +239,7 @@ export default {
|
|
|
239
239
|
|
|
240
240
|
makeResetBtn() {
|
|
241
241
|
const resetBtn = {...this.options.resetBtn};
|
|
242
|
-
const innerText = resetBtn.innerText;
|
|
242
|
+
const innerText = resetBtn.innerText || this.$handle.api.t('reset') || '重置';
|
|
243
243
|
delete resetBtn.innerText;
|
|
244
244
|
delete resetBtn.click;
|
|
245
245
|
delete resetBtn.col;
|
|
@@ -262,7 +262,7 @@ export default {
|
|
|
262
262
|
},
|
|
263
263
|
makeSubmitBtn() {
|
|
264
264
|
const submitBtn = {...this.options.submitBtn};
|
|
265
|
-
const innerText = submitBtn.innerText;
|
|
265
|
+
const innerText = submitBtn.innerText || this.$handle.api.t('submit') || '提交';
|
|
266
266
|
delete submitBtn.innerText;
|
|
267
267
|
delete submitBtn.click;
|
|
268
268
|
delete submitBtn.col;
|
package/src/core/provider.js
CHANGED
|
@@ -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 =
|
|
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
|
|
24
|
+
validate.message = api.t(match[1], {title});
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
inject.getProp().validate = [validate];
|