@tmagic/form 1.3.6 → 1.3.8

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.
@@ -54,6 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
54
54
  readonly size?: "large" | "default" | "small" | undefined;
55
55
  readonly extendState?: ((state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
56
56
  onChange?: ((...args: any[]) => any) | undefined;
57
+ onError?: ((...args: any[]) => any) | undefined;
57
58
  "onField-input"?: ((...args: any[]) => any) | undefined;
58
59
  "onField-change"?: ((...args: any[]) => any) | undefined;
59
60
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
@@ -118,6 +119,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
118
119
  };
119
120
  }>> & {
120
121
  onChange?: ((...args: any[]) => any) | undefined;
122
+ onError?: ((...args: any[]) => any) | undefined;
121
123
  "onField-input"?: ((...args: any[]) => any) | undefined;
122
124
  "onField-change"?: ((...args: any[]) => any) | undefined;
123
125
  }, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
@@ -132,7 +134,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
132
134
  }>;
133
135
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
134
136
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
135
- $emit: ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
137
+ $emit: ((event: "change", ...args: any[]) => void) & ((event: "error", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
136
138
  $el: any;
137
139
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
138
140
  config: {
@@ -196,6 +198,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
196
198
  };
197
199
  }>> & {
198
200
  onChange?: ((...args: any[]) => any) | undefined;
201
+ onError?: ((...args: any[]) => any) | undefined;
199
202
  "onField-input"?: ((...args: any[]) => any) | undefined;
200
203
  "onField-change"?: ((...args: any[]) => any) | undefined;
201
204
  }, {
@@ -208,6 +211,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
208
211
  submitForm: (native?: boolean | undefined) => Promise<any>;
209
212
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
210
213
  change: (...args: any[]) => void;
214
+ error: (...args: any[]) => void;
211
215
  "field-input": (...args: any[]) => void;
212
216
  "field-change": (...args: any[]) => void;
213
217
  }, string, {
@@ -305,6 +309,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
305
309
  };
306
310
  }>> & {
307
311
  onChange?: ((...args: any[]) => any) | undefined;
312
+ onError?: ((...args: any[]) => any) | undefined;
308
313
  "onField-input"?: ((...args: any[]) => any) | undefined;
309
314
  "onField-change"?: ((...args: any[]) => any) | undefined;
310
315
  } & import("vue").ShallowUnwrapRef<{
@@ -323,8 +328,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
323
328
  handleClose: () => void;
324
329
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
325
330
  change: (...args: any[]) => void;
326
- submit: (...args: any[]) => void;
327
331
  error: (...args: any[]) => void;
332
+ submit: (...args: any[]) => void;
328
333
  close: (...args: any[]) => void;
329
334
  closed: (...args: any[]) => void;
330
335
  open: (...args: any[]) => void;
package/types/schema.d.ts CHANGED
@@ -552,6 +552,8 @@ export interface TableConfig extends FormItem {
552
552
  fixed?: boolean;
553
553
  itemExtra?: string | FilterFunction<string>;
554
554
  rowKey?: string;
555
+ /** table 新增行时前置回调 */
556
+ beforeAddRow?: (mForm: FormState | undefined, data: any) => boolean;
555
557
  }
556
558
  export interface GroupListConfig extends FormItem {
557
559
  type: 'table' | 'groupList' | 'group-list';