@form-create/iview 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/iview",
3
- "version": "2.5.33",
3
+ "version": "2.5.35",
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",
@@ -43,16 +43,16 @@
43
43
  },
44
44
  "homepage": "http://www.form-create.com",
45
45
  "dependencies": {
46
- "@form-create/component-ivu-checkbox": "^2.5.32",
47
- "@form-create/component-ivu-frame": "^2.5.31",
48
- "@form-create/component-ivu-group": "^2.5.33",
49
- "@form-create/component-ivu-radio": "^2.5.32",
50
- "@form-create/component-ivu-select": "^2.5.33",
51
- "@form-create/component-ivu-tree": "^2.5.32",
52
- "@form-create/component-ivu-upload": "^2.5.32",
46
+ "@form-create/component-ivu-checkbox": "^2.5.35",
47
+ "@form-create/component-ivu-frame": "^2.5.35",
48
+ "@form-create/component-ivu-group": "^2.5.35",
49
+ "@form-create/component-ivu-radio": "^2.5.35",
50
+ "@form-create/component-ivu-select": "^2.5.35",
51
+ "@form-create/component-ivu-tree": "^2.5.35",
52
+ "@form-create/component-ivu-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
  "iview": "^3.3.3",
65
65
  "v-jsoneditor": "^1.4.2"
66
66
  },
67
- "gitHead": "12917cac42299a1b546cb76ab6a901bcaa872801"
67
+ "gitHead": "1cea842d9380bbc9f3bc01470e7e17f5a952dffb"
68
68
  }
@@ -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 children = [titleProp.title];
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 = {