@form-create/iview 2.5.33 → 2.5.34
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.js +31 -12
- package/dist/form-create.min.js +3 -3
- package/dist/form-create.min.js.map +1 -1
- package/package.json +3 -3
- package/src/core/manager.js +6 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@form-create/iview",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.34",
|
|
4
4
|
"description": "iview动态表单|form-create is a form generation component that can generate dynamic rendering, data collection, verification and submission functions through JSON. Supports 3 UI frameworks, and supports the generation of any Vue components. Built-in 20 kinds of commonly used form components and custom components, no matter how complex forms can be easily handled.",
|
|
5
5
|
"main": "./dist/form-create.min.js",
|
|
6
6
|
"module": "./dist/form-create.min.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@form-create/component-ivu-tree": "^2.5.32",
|
|
52
52
|
"@form-create/component-ivu-upload": "^2.5.32",
|
|
53
53
|
"@form-create/component-subform": "^2.5.25",
|
|
54
|
-
"@form-create/core": "^2.5.
|
|
54
|
+
"@form-create/core": "^2.5.34",
|
|
55
55
|
"@form-create/utils": "^2.5.31"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"iview": "^3.3.3",
|
|
65
65
|
"v-jsoneditor": "^1.4.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "efec4af8b916b444cb28ab2105bd68b0dc90c890"
|
|
68
68
|
}
|
package/src/core/manager.js
CHANGED
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
tidyOptions(options) {
|
|
54
|
-
['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col'].forEach(name => {
|
|
54
|
+
['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(name => {
|
|
55
55
|
tidyBool(options, name);
|
|
56
56
|
})
|
|
57
57
|
return options;
|
|
@@ -66,6 +66,7 @@ export default {
|
|
|
66
66
|
info: this.options.info || {},
|
|
67
67
|
wrap: this.options.wrap || {},
|
|
68
68
|
col: this.options.col || {},
|
|
69
|
+
title: this.options.title || {},
|
|
69
70
|
}, ctx.prop], {
|
|
70
71
|
info: info(),
|
|
71
72
|
title: {},
|
|
@@ -128,7 +129,7 @@ export default {
|
|
|
128
129
|
key: `${uni}fi`,
|
|
129
130
|
ref: ctx.wrapRef,
|
|
130
131
|
type: 'formItem',
|
|
131
|
-
}]), [children, isTitle ? this.makeInfo(rule, uni) : null]);
|
|
132
|
+
}]), [children, isTitle ? this.makeInfo(rule, uni, ctx) : null]);
|
|
132
133
|
return (inline === true || isFalse(_col) || isFalse(col.show)) ? item : this.makeCol(rule, uni, [item]);
|
|
133
134
|
},
|
|
134
135
|
isTitle(rule) {
|
|
@@ -136,17 +137,11 @@ export default {
|
|
|
136
137
|
const title = rule.title;
|
|
137
138
|
return !((!title.title && !title.native) || isFalse(title.show))
|
|
138
139
|
},
|
|
139
|
-
makeInfo(rule, uni) {
|
|
140
|
+
makeInfo(rule, uni, ctx) {
|
|
140
141
|
const titleProp = rule.title;
|
|
141
142
|
const infoProp = rule.info;
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
const titleFn = (pop) => this.$r(mergeProps([titleProp, {
|
|
145
|
-
props: titleProp,
|
|
146
|
-
slot: titleProp.slot || (pop ? 'default' : 'label'),
|
|
147
|
-
key: `${uni}tit`,
|
|
148
|
-
type: titleProp.type || 'span',
|
|
149
|
-
}]), children);
|
|
143
|
+
const titleSlot = this.getSlot('title');
|
|
144
|
+
const children = [titleSlot ? titleSlot({title: titleProp.title || '', rule: ctx.rule, options: this.options}) : titleProp.title];
|
|
150
145
|
|
|
151
146
|
if (!isFalse(infoProp.show) && (infoProp.info || infoProp.native) && !isFalse(infoProp.icon)) {
|
|
152
147
|
const prop = {
|