@form-create/element-ui 3.1.6 → 3.1.9

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.
@@ -137,8 +137,8 @@ export default {
137
137
  return !((!title.title && !title.native) || isFalse(title.show))
138
138
  },
139
139
  makeInfo(rule, uni) {
140
- const titleProp = rule.title;
141
- const infoProp = rule.info;
140
+ const titleProp = {...rule.title};
141
+ const infoProp = {...rule.info};
142
142
  const isTip = isTooltip(infoProp);
143
143
  const form = this.options.form;
144
144
  const children = [(titleProp.title || '') + (form.labelSuffix || form['label-suffix'] || '')];
@@ -153,6 +153,8 @@ export default {
153
153
  delete prop.props.icon;
154
154
  delete prop.props.show;
155
155
  delete prop.props.info;
156
+ delete prop.props.align;
157
+ delete prop.props.native;
156
158
 
157
159
  const field = 'content';
158
160
  if (infoProp.info && !hasProperty(prop.props, field)) {
@@ -171,12 +173,17 @@ export default {
171
173
  }, true)
172
174
  }));
173
175
  }
174
-
175
- return this.$r(mergeProps([titleProp, {
176
+ const _prop = mergeProps([titleProp, {
176
177
  props: titleProp,
177
178
  key: `${uni}tit`,
178
179
  type: titleProp.type || 'span',
179
- }]), children);
180
+ }]);
181
+
182
+ delete _prop.props.show;
183
+ delete _prop.props.title;
184
+ delete _prop.props.native;
185
+
186
+ return this.$r(_prop, children);
180
187
  },
181
188
  makeCol(rule, uni, children) {
182
189
  const col = rule.col;
@@ -225,6 +232,9 @@ export default {
225
232
  const resetBtn = {...this.options.resetBtn};
226
233
  const innerText = resetBtn.innerText;
227
234
  delete resetBtn.innerText;
235
+ delete resetBtn.click;
236
+ delete resetBtn.col;
237
+ delete resetBtn.show;
228
238
  return this.$r({
229
239
  type: 'button',
230
240
  props: resetBtn,
@@ -232,8 +242,8 @@ export default {
232
242
  on: {
233
243
  click: () => {
234
244
  const fApi = this.$handle.api;
235
- resetBtn.click
236
- ? resetBtn.click(fApi)
245
+ this.options.resetBtn.click
246
+ ? this.options.resetBtn.click(fApi)
237
247
  : fApi.resetFields();
238
248
  }
239
249
  },
@@ -244,6 +254,9 @@ export default {
244
254
  const submitBtn = {...this.options.submitBtn};
245
255
  const innerText = submitBtn.innerText;
246
256
  delete submitBtn.innerText;
257
+ delete submitBtn.click;
258
+ delete submitBtn.col;
259
+ delete submitBtn.show;
247
260
  return this.$r({
248
261
  type: 'button',
249
262
  props: submitBtn,
@@ -251,8 +264,8 @@ export default {
251
264
  on: {
252
265
  click: () => {
253
266
  const fApi = this.$handle.api;
254
- submitBtn.click
255
- ? submitBtn.click(fApi)
267
+ this.options.submitBtn.click
268
+ ? this.options.submitBtn.click(fApi)
256
269
  : fApi.submit();
257
270
  }
258
271
  },