@form-create/element-ui 3.1.28 → 3.1.29

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.
@@ -59,7 +59,7 @@ export default {
59
59
  }
60
60
  },
61
61
  tidyOptions(options) {
62
- ['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col'].forEach(name => {
62
+ ['submitBtn', 'resetBtn', 'row', 'info', 'wrap', 'col', 'title'].forEach(name => {
63
63
  tidyBool(options, name);
64
64
  })
65
65
  return options;
@@ -74,6 +74,7 @@ export default {
74
74
  info: this.options.info || {},
75
75
  wrap: this.options.wrap || {},
76
76
  col: this.options.col || {},
77
+ title: this.options.title || {},
77
78
  }, ctx.prop], {
78
79
  info: {
79
80
  trigger: 'hover',
@@ -97,7 +98,7 @@ export default {
97
98
  e.preventDefault();
98
99
  }
99
100
  },
100
- class: [form.className, form.class, 'form-create'],
101
+ class: [form.className, form.class, 'form-create', this.options.preview ? 'is-preview' : ''],
101
102
  style: form.style,
102
103
  type: 'form',
103
104
  };
@@ -110,7 +111,7 @@ export default {
110
111
  });
111
112
  },
112
113
  render(children) {
113
- if (children.slotLen()) {
114
+ if (children.slotLen() && !this.options.preview) {
114
115
  children.setSlot(undefined, () => this.makeFormBtn());
115
116
  }
116
117
  return this.$r(this.rule, isFalse(this.options.row.show) ? children.getSlots() : [this.makeRow(children)]);
@@ -5,3 +5,7 @@
5
5
  .form-create{
6
6
  width: 100%;
7
7
  }
8
+
9
+ .form-create.is-preview .fc-clock, .form-create .fc-none {
10
+ display: none !important;
11
+ }