@form-create/element-ui 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 +27 -8
- 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 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@form-create/element-ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.34",
|
|
4
4
|
"description": "element-ui动态表单|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-elm-tree": "^2.5.32",
|
|
52
52
|
"@form-create/component-elm-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
|
"element-ui": "^2.15.9",
|
|
65
65
|
"v-jsoneditor": "^1.4.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "efec4af8b916b444cb28ab2105bd68b0dc90c890"
|
|
68
68
|
}
|
package/src/core/manager.js
CHANGED
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
tidyOptions(options) {
|
|
61
|
-
['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col'].forEach(name => {
|
|
61
|
+
['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(name => {
|
|
62
62
|
tidyBool(options, name);
|
|
63
63
|
})
|
|
64
64
|
return options;
|
|
@@ -79,6 +79,7 @@ export default {
|
|
|
79
79
|
info: this.options.info || {},
|
|
80
80
|
wrap: this.options.wrap || {},
|
|
81
81
|
col: this.options.col || {},
|
|
82
|
+
title: this.options.title || {},
|
|
82
83
|
}, ctx.prop], {
|
|
83
84
|
info: {
|
|
84
85
|
trigger: 'hover',
|
|
@@ -140,7 +141,7 @@ export default {
|
|
|
140
141
|
key: `${uni}fi`,
|
|
141
142
|
ref: ctx.wrapRef,
|
|
142
143
|
type: 'formItem',
|
|
143
|
-
}]), [children, isTitle ? this.makeInfo(rule, uni) : null]);
|
|
144
|
+
}]), [children, isTitle ? this.makeInfo(rule, uni, ctx) : null]);
|
|
144
145
|
return (inline === true || isFalse(_col) || isFalse(col.show)) ? item : this.makeCol(rule, uni, [item]);
|
|
145
146
|
},
|
|
146
147
|
isTitle(rule) {
|
|
@@ -148,12 +149,13 @@ export default {
|
|
|
148
149
|
const title = rule.title;
|
|
149
150
|
return !((!title.title && !title.native) || isFalse(title.show))
|
|
150
151
|
},
|
|
151
|
-
makeInfo(rule, uni) {
|
|
152
|
+
makeInfo(rule, uni, ctx) {
|
|
152
153
|
const titleProp = rule.title;
|
|
153
154
|
const infoProp = rule.info;
|
|
154
155
|
const isTip = isTooltip(infoProp);
|
|
155
156
|
const form = this.options.form;
|
|
156
|
-
const
|
|
157
|
+
const titleSlot = this.getSlot('title');
|
|
158
|
+
const children = [titleSlot ? titleSlot({title: titleProp.title || '', rule: ctx.rule, options: this.options}) : ((titleProp.title || '') + (form.labelSuffix || form['label-suffix'] || ''))];
|
|
157
159
|
|
|
158
160
|
if (!isFalse(infoProp.show) && (infoProp.info || infoProp.native) && !isFalse(infoProp.icon)) {
|
|
159
161
|
const prop = {
|