@form-create/element-ui 2.5.33 → 2.5.35

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": "2.5.33",
3
+ "version": "2.5.35",
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",
@@ -43,16 +43,16 @@
43
43
  },
44
44
  "homepage": "http://www.form-create.com",
45
45
  "dependencies": {
46
- "@form-create/component-elm-checkbox": "^2.5.32",
47
- "@form-create/component-elm-frame": "^2.5.31",
48
- "@form-create/component-elm-group": "^2.5.33",
49
- "@form-create/component-elm-radio": "^2.5.32",
50
- "@form-create/component-elm-select": "^2.5.33",
51
- "@form-create/component-elm-tree": "^2.5.32",
52
- "@form-create/component-elm-upload": "^2.5.32",
46
+ "@form-create/component-elm-checkbox": "^2.5.35",
47
+ "@form-create/component-elm-frame": "^2.5.35",
48
+ "@form-create/component-elm-group": "^2.5.35",
49
+ "@form-create/component-elm-radio": "^2.5.35",
50
+ "@form-create/component-elm-select": "^2.5.35",
51
+ "@form-create/component-elm-tree": "^2.5.35",
52
+ "@form-create/component-elm-upload": "^2.5.35",
53
53
  "@form-create/component-subform": "^2.5.25",
54
- "@form-create/core": "^2.5.33",
55
- "@form-create/utils": "^2.5.31"
54
+ "@form-create/core": "^2.5.35",
55
+ "@form-create/utils": "^2.5.35"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"
@@ -64,5 +64,5 @@
64
64
  "element-ui": "^2.15.9",
65
65
  "v-jsoneditor": "^1.4.2"
66
66
  },
67
- "gitHead": "12917cac42299a1b546cb76ab6a901bcaa872801"
67
+ "gitHead": "1cea842d9380bbc9f3bc01470e7e17f5a952dffb"
68
68
  }
@@ -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 children = [(titleProp.title || '') + (form.labelSuffix || form['label-suffix'] || '')];
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 = {