@tmagic/form 1.8.0-beta.1 → 1.8.0-beta.11

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.
Files changed (61) hide show
  1. package/dist/es/Form.vue_vue_type_script_setup_true_lang.js +25 -6
  2. package/dist/es/FormBox.vue_vue_type_script_setup_true_lang.js +7 -1
  3. package/dist/es/FormDialog.vue_vue_type_script_setup_true_lang.js +7 -1
  4. package/dist/es/FormDrawer.vue_vue_type_script_setup_true_lang.js +7 -1
  5. package/dist/es/containers/Col.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/dist/es/containers/Container.vue_vue_type_script_setup_true_lang.js +195 -78
  7. package/dist/es/containers/Fieldset.vue_vue_type_script_setup_true_lang.js +5 -3
  8. package/dist/es/containers/FlexLayout.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/es/containers/FormLabel.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/dist/es/containers/GroupList.vue_vue_type_script_setup_true_lang.js +6 -3
  11. package/dist/es/containers/GroupListItem.vue_vue_type_script_setup_true_lang.js +10 -9
  12. package/dist/es/containers/Panel.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/es/containers/Row.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/dist/es/containers/Step.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/dist/es/containers/Tabs.vue_vue_type_script_setup_true_lang.js +6 -3
  16. package/dist/es/containers/table/ActionsColumn.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/dist/es/containers/table/SortColumn.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/es/containers/table/Table.vue_vue_type_script_setup_true_lang.js +4 -4
  19. package/dist/es/containers/table-group-list/TableGroupList.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/es/fields/Cascader.vue_vue_type_script_setup_true_lang.js +1 -1
  21. package/dist/es/fields/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  22. package/dist/es/fields/CheckboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  23. package/dist/es/fields/ColorPicker.vue_vue_type_script_setup_true_lang.js +1 -1
  24. package/dist/es/fields/Date.vue_vue_type_script_setup_true_lang.js +1 -1
  25. package/dist/es/fields/DateTime.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/es/fields/Daterange.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/dist/es/fields/Display.vue_vue_type_script_setup_true_lang.js +1 -1
  28. package/dist/es/fields/DynamicField.vue_vue_type_script_setup_true_lang.js +1 -1
  29. package/dist/es/fields/Hidden.vue_vue_type_script_setup_true_lang.js +1 -1
  30. package/dist/es/fields/Link.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/es/fields/Number.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/dist/es/fields/NumberRange.vue_vue_type_script_setup_true_lang.js +1 -1
  33. package/dist/es/fields/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  34. package/dist/es/fields/Select.vue_vue_type_script_setup_true_lang.js +1 -1
  35. package/dist/es/fields/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/es/fields/Text.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/es/fields/Textarea.vue_vue_type_script_setup_true_lang.js +1 -1
  38. package/dist/es/fields/Time.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/dist/es/fields/Timerange.vue_vue_type_script_setup_true_lang.js +1 -1
  40. package/dist/es/index.js +2 -1
  41. package/dist/es/schema.js +4 -0
  42. package/dist/es/style.css +4 -1
  43. package/dist/es/submitForm.js +111 -8
  44. package/dist/es/utils/form.js +2 -2
  45. package/dist/style.css +4 -1
  46. package/dist/tmagic-form.umd.cjs +1865 -1598
  47. package/package.json +5 -5
  48. package/src/Form.vue +64 -3
  49. package/src/FormBox.vue +4 -0
  50. package/src/FormDialog.vue +4 -0
  51. package/src/FormDrawer.vue +4 -0
  52. package/src/containers/Container.vue +178 -54
  53. package/src/containers/Fieldset.vue +5 -2
  54. package/src/containers/GroupList.vue +1 -1
  55. package/src/containers/GroupListItem.vue +4 -3
  56. package/src/containers/Tabs.vue +10 -2
  57. package/src/containers/table/Table.vue +9 -3
  58. package/src/schema.ts +47 -0
  59. package/src/submitForm.ts +196 -16
  60. package/src/theme/container.scss +4 -1
  61. package/types/index.d.ts +1021 -421
package/types/index.d.ts CHANGED
@@ -1,12 +1,38 @@
1
- import { FlexLayoutConfig, GroupListConfig, TableConfig } from "@tmagic/form-schema";
2
- import { App, AppContext, Component } from "vue";
1
+ import { App, AppContext, Component, InjectionKey } from "vue";
2
+ import { FlexLayoutConfig, FormItemConfig, GroupListConfig, TableConfig } from "@tmagic/form-schema";
3
3
  export * from "@tmagic/form-schema";
4
4
 
5
5
  //#region \0rolldown/runtime.js
6
6
  declare namespace schema_d_exports {
7
- export { ChangeRecord, ContainerChangeEventData, ValidateError };
7
+ export { ChangeRecord, ContainerChangeEventData, FORM_DIFF_CONFIG_KEY, FormDiffConfig, FormLabelSlotProps, FormSlots, ValidateError };
8
8
  }
9
9
  import * as import__tmagic_form_schema from "@tmagic/form-schema";
10
+ /**
11
+ * 对比模式相关配置,由 `MForm` 通过 `provide` 注入,
12
+ * 所有层级的 Container(含嵌套在 fieldset / panel 等容器组件内部的 Container)通过 `inject` 获取,
13
+ * 无需逐层透传 prop。
14
+ */
15
+ interface FormDiffConfig {
16
+ /**
17
+ * 自定义"是否展示对比内容"的判断函数(仅在对比模式下生效)。
18
+ *
19
+ * - 不传:使用默认逻辑 `!isEqual(curValue, lastValue)`;
20
+ * - 传函数:完全以函数返回值为准,返回 `true` 才展示前后两份对比内容。
21
+ */
22
+ showDiff?: (_data: {
23
+ curValue: any;
24
+ lastValue: any;
25
+ config: FormItemConfig;
26
+ }) => boolean;
27
+ /**
28
+ * 自定义「自接管对比」的字段类型(仅在对比模式下生效)。
29
+ *
30
+ * - 传数组:在内置类型基础上「追加」这些类型;
31
+ * - 传函数:入参为内置类型数组,返回值作为「最终」完整类型列表(可完全替换内置项)。
32
+ */
33
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
34
+ }
35
+ declare const FORM_DIFF_CONFIG_KEY: InjectionKey<FormDiffConfig>;
10
36
  interface ValidateError {
11
37
  message: string;
12
38
  field: string;
@@ -19,6 +45,23 @@ interface ContainerChangeEventData {
19
45
  modifyKey?: string;
20
46
  changeRecords?: ChangeRecord[];
21
47
  }
48
+ /** 自定义 label slot 的作用域参数 */
49
+ interface FormLabelSlotProps {
50
+ /** 当前表单项配置 */
51
+ config: FormItemConfig;
52
+ /** 经处理后的类型 */
53
+ type: string;
54
+ /** 经 filterFunction 处理后的 label 文案 */
55
+ text?: string;
56
+ /** 完整字段路径(包含父级前缀) */
57
+ prop: string;
58
+ /** 经 filterFunction 处理后的最终禁用状态 */
59
+ disabled?: boolean;
60
+ }
61
+ /** Form / Container 暴露的具名 slot 定义 */
62
+ interface FormSlots {
63
+ label(_props: FormLabelSlotProps): any;
64
+ }
22
65
  //#endregion
23
66
  //#region temp/packages/form/src/submitForm.d.ts
24
67
  /**
@@ -44,9 +87,19 @@ interface SubmitFormOptions {
44
87
  keyProp?: string;
45
88
  popperClass?: string;
46
89
  preventSubmitDefault?: boolean;
90
+ /**
91
+ * 表单校验失败时,错误提示前缀是否使用字段的 text 文案(通过 `getTextByName` 从 config 中查找)。
92
+ * 默认 `true`,置为 `false` 时直接使用字段 name。
93
+ */
94
+ useFieldTextInError?: boolean;
47
95
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
48
96
  /** 透传给 Form.submitForm 的参数:是否直接返回原始响应式 values */
49
97
  native?: boolean;
98
+ /**
99
+ * 是否在 resolve 结果中携带 changeRecords(变更记录)。
100
+ * 开启后 resolve 的结果为 `{ values, changeRecords }`,否则仅 resolve values。
101
+ */
102
+ returnChangeRecords?: boolean;
50
103
  /**
51
104
  * 父级应用上下文,用于继承全局组件、指令、provide 等。
52
105
  * 通常通过 `app._context` 或 `getCurrentInstance()?.appContext` 获取。
@@ -54,6 +107,24 @@ interface SubmitFormOptions {
54
107
  appContext?: AppContext | null;
55
108
  /** 等待表单初始化的最长时间(毫秒),超时将以错误 reject。默认 10000ms */
56
109
  timeout?: number;
110
+ /**
111
+ * 调试模式。默认 `false`。
112
+ *
113
+ * - `false`:表单以隐藏方式挂载,初始化完成后自动提交(原有行为)。
114
+ * - `true`:将表单以弹层形式可见地渲染在页面上,需手动点击「确定」才会触发校验/提交,
115
+ * 点击「取消」则以 reject 中断;校验失败时保留弹层并展示错误信息,便于修正后重试。
116
+ * 调试模式下 `timeout` 不生效(等待人工操作)。
117
+ */
118
+ debug?: boolean;
119
+ }
120
+ /**
121
+ * 开启 `returnChangeRecords` 时 submitForm 的返回结果
122
+ */
123
+ interface SubmitFormResult {
124
+ /** 校验通过后的表单值 */
125
+ values: any;
126
+ /** 表单变更记录 */
127
+ changeRecords: ChangeRecord[];
57
128
  }
58
129
  /**
59
130
  * 以命令式方式调用 Form.vue 完成一次表单校验/提交。
@@ -75,6 +146,20 @@ interface SubmitFormOptions {
75
146
  * } catch (e) {
76
147
  * console.error(e);
77
148
  * }
149
+ *
150
+ * // 需要同时获取变更记录时:
151
+ * const { values, changeRecords } = await submitForm({
152
+ * config: [...],
153
+ * initValues: { name: 'foo' },
154
+ * returnChangeRecords: true,
155
+ * });
156
+ *
157
+ * // 调试模式:可见地渲染表单,点击「确定」才提交:
158
+ * const values = await submitForm({
159
+ * config: [...],
160
+ * initValues: { name: 'foo' },
161
+ * debug: true,
162
+ * });
78
163
  * ```
79
164
  */
80
165
  declare const submitForm: (options: SubmitFormOptions) => Promise<any>;
@@ -104,6 +189,7 @@ declare const createObjectProp: (prop: string, key: string, name?: string | numb
104
189
  declare const useAddField: (prop?: string) => void;
105
190
  //#endregion
106
191
  //#region temp/packages/form/src/Form.vue.d.ts
192
+ type __VLS_Slots$5 = FormSlots;
107
193
  type __VLS_Props$30 = {
108
194
  /** 表单配置 */config: schema_d_exports.FormConfig; /** 表单值 */
109
195
  initValues: Record<string, any>; /** 需对比的值(开启对比模式时传入) */
@@ -120,9 +206,47 @@ type __VLS_Props$30 = {
120
206
  keyProp?: string;
121
207
  popperClass?: string;
122
208
  preventSubmitDefault?: boolean;
209
+ /**
210
+ * 表单校验失败时,错误提示前缀是否使用字段的 text 文案(通过 `getTextByName` 从 config 中查找)。
211
+ *
212
+ * - `true`(默认):错误提示形如 `字段文案 -> 错误信息`,找不到 text 时回退为字段 name;
213
+ * - `false`:跳过查找,直接使用字段 name 作为错误提示前缀(形如 `字段name -> 错误信息`)。
214
+ */
215
+ useFieldTextInError?: boolean;
123
216
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
217
+ /**
218
+ * 自定义"是否展示对比内容"的判断函数(仅在 `isCompare === true` 时生效)。
219
+ *
220
+ * - 不传:使用默认逻辑 `!isEqual(curValue, lastValue)`;
221
+ * - 传函数:完全以函数返回值为准,返回 `true` 才展示前后两份对比内容。
222
+ *
223
+ * 通过 provide 下发给所有层级的 Container(含嵌套在容器组件内部的 Container),
224
+ * 调用方只需在 MForm 这一层传一次即可对整棵表单生效。
225
+ *
226
+ * 典型场景:某些字段语义上相等但结构不同(例如 `code-select` 字段中 `''` 与
227
+ * `{ hookType: 'code', hookData: [] }` 应视为相等),调用方在此处显式声明,
228
+ * 避免被 lodash `isEqual` 误判为差异。
229
+ */
230
+ showDiff?: (_data: {
231
+ curValue: any;
232
+ lastValue: any;
233
+ config: any;
234
+ }) => boolean;
235
+ /**
236
+ * 自定义「自接管对比」的字段类型(仅在对比模式下生效)。
237
+ *
238
+ * 自接管对比的字段不会渲染前后两份独立组件,而是只渲染一次并由字段组件内部展示前后差异
239
+ * (如 vs-code 使用 monaco diff 编辑器;event-select / code-select-col 等复合字段逐项展示差异)。
240
+ *
241
+ * 支持两种形式:
242
+ * - 传数组:在内置类型基础上「追加」这些类型;
243
+ * - 传函数:入参为内置类型数组,返回值作为「最终」完整列表(可完全替换内置项)。
244
+ *
245
+ * 通过 provide 下发,对整棵表单的所有层级 Container 生效,只需在 MForm 这一层传一次。
246
+ */
247
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
124
248
  };
125
- declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {
249
+ declare const __VLS_base$5: import("@vue/runtime-core").DefineComponent<__VLS_Props$30, {
126
250
  values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
127
251
  lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
128
252
  formState: schema_d_exports.FormState;
@@ -157,8 +281,15 @@ declare const __VLS_export$30: import("@vue/runtime-core").DefineComponent<__VLS
157
281
  keyProp: string;
158
282
  parentValues: Record<string, any>;
159
283
  stepActive: string | number;
284
+ useFieldTextInError: boolean;
160
285
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
286
+ declare const __VLS_export$30: __VLS_WithSlots$5<typeof __VLS_base$5, __VLS_Slots$5>;
161
287
  declare const _default$12: typeof __VLS_export$30;
288
+ type __VLS_WithSlots$5<T, S> = T & {
289
+ new (): {
290
+ $slots: S;
291
+ };
292
+ };
162
293
  //#endregion
163
294
  //#region temp/packages/form/src/FormDialog.vue.d.ts
164
295
  type __VLS_Props$29 = {
@@ -180,58 +311,145 @@ type __VLS_Props$29 = {
180
311
  closeOnPressEscape?: boolean;
181
312
  destroyOnClose?: boolean;
182
313
  showClose?: boolean;
183
- showCancel?: boolean; /** 透传给内部 `MForm`,用于扩展 `formState`(如注入 `$message` / `$store` 等) */
314
+ showCancel?: boolean; /** 透传给内部 `MForm`,控制表单校验失败时错误提示前缀是否使用字段的 text 文案 */
315
+ useFieldTextInError?: boolean; /** 透传给内部 `MForm`,用于扩展 `formState`(如注入 `$message` / `$store` 等) */
184
316
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
185
317
  };
186
318
  declare var __VLS_19: {}, __VLS_34: {}, __VLS_42: {};
187
- type __VLS_Slots$3 = {} & {
319
+ type __VLS_Slots$4 = {} & {
188
320
  default?: (props: typeof __VLS_19) => any;
189
321
  } & {
190
322
  left?: (props: typeof __VLS_34) => any;
191
323
  } & {
192
324
  footer?: (props: typeof __VLS_42) => any;
193
325
  };
194
- declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Props$29, {
195
- form: import("@vue/reactivity").Ref<import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
196
- config: schema_d_exports.FormConfig;
197
- initValues: Record<string, any>;
198
- lastValues?: Record<string, any>;
199
- isCompare?: boolean;
200
- parentValues?: Record<string, any>;
201
- labelWidth?: string;
202
- disabled?: boolean;
203
- height?: string;
204
- stepActive?: string | number;
205
- size?: "small" | "default" | "large";
206
- inline?: boolean;
207
- labelPosition?: string;
208
- keyProp?: string;
209
- popperClass?: string;
210
- preventSubmitDefault?: boolean;
211
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
212
- }> & Readonly<{
213
- onError?: ((...args: any[]) => any) | undefined;
214
- onChange?: ((...args: any[]) => any) | undefined;
215
- "onField-input"?: ((...args: any[]) => any) | undefined;
216
- "onField-change"?: ((...args: any[]) => any) | undefined;
217
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
218
- }>, {
219
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
220
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
221
- formState: schema_d_exports.FormState;
222
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
223
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
224
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
225
- resetForm: () => void;
226
- submitForm: (native?: boolean) => Promise<any>;
227
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
228
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
229
- error: (...args: any[]) => void;
230
- change: (...args: any[]) => void;
231
- "field-input": (...args: any[]) => void;
232
- "field-change": (...args: any[]) => void;
233
- "update:stepActive": (...args: any[]) => void;
234
- }, import("@vue/runtime-core").PublicProps, {
326
+ declare const __VLS_base$4: import("@vue/runtime-core").DefineComponent<__VLS_Props$29, {
327
+ form: import("@vue/reactivity").Ref<({
328
+ $: import("@vue/runtime-core").ComponentInternalInstance;
329
+ $data: {};
330
+ $props: {
331
+ readonly config: schema_d_exports.FormConfig;
332
+ readonly initValues: Record<string, any>;
333
+ readonly lastValues?: Record<string, any> | undefined;
334
+ readonly isCompare?: boolean | undefined;
335
+ readonly parentValues?: Record<string, any> | undefined;
336
+ readonly labelWidth?: string | undefined;
337
+ readonly disabled?: boolean | undefined;
338
+ readonly height?: string | undefined;
339
+ readonly stepActive?: string | number | undefined;
340
+ readonly size?: "small" | "default" | "large" | undefined;
341
+ readonly inline?: boolean | undefined;
342
+ readonly labelPosition?: string | undefined;
343
+ readonly keyProp?: string | undefined;
344
+ readonly popperClass?: string | undefined;
345
+ readonly preventSubmitDefault?: boolean | undefined;
346
+ readonly useFieldTextInError?: boolean | undefined;
347
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
348
+ readonly showDiff?: ((_data: {
349
+ curValue: any;
350
+ lastValue: any;
351
+ config: any;
352
+ }) => boolean) | undefined;
353
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
354
+ readonly onError?: ((...args: any[]) => any) | undefined;
355
+ readonly onChange?: ((...args: any[]) => any) | undefined;
356
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
357
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
358
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
359
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
360
+ $attrs: import("@vue/runtime-core").Attrs;
361
+ $refs: {
362
+ [x: string]: unknown;
363
+ };
364
+ $slots: Readonly<{
365
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
366
+ }>;
367
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
368
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
369
+ $host: Element | null;
370
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
371
+ $el: any;
372
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
373
+ config: schema_d_exports.FormConfig;
374
+ initValues: Record<string, any>;
375
+ lastValues?: Record<string, any>;
376
+ isCompare?: boolean;
377
+ parentValues?: Record<string, any>;
378
+ labelWidth?: string;
379
+ disabled?: boolean;
380
+ height?: string;
381
+ stepActive?: string | number;
382
+ size?: "small" | "default" | "large";
383
+ inline?: boolean;
384
+ labelPosition?: string;
385
+ keyProp?: string;
386
+ popperClass?: string;
387
+ preventSubmitDefault?: boolean;
388
+ useFieldTextInError?: boolean;
389
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
390
+ showDiff?: (_data: {
391
+ curValue: any;
392
+ lastValue: any;
393
+ config: any;
394
+ }) => boolean;
395
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
396
+ }> & Readonly<{
397
+ onError?: ((...args: any[]) => any) | undefined;
398
+ onChange?: ((...args: any[]) => any) | undefined;
399
+ "onField-input"?: ((...args: any[]) => any) | undefined;
400
+ "onField-change"?: ((...args: any[]) => any) | undefined;
401
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
402
+ }>, {
403
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
404
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
405
+ formState: schema_d_exports.FormState;
406
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
407
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
408
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
409
+ resetForm: () => void;
410
+ submitForm: (native?: boolean) => Promise<any>;
411
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
412
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
413
+ error: (...args: any[]) => void;
414
+ change: (...args: any[]) => void;
415
+ "field-input": (...args: any[]) => void;
416
+ "field-change": (...args: any[]) => void;
417
+ "update:stepActive": (...args: any[]) => void;
418
+ }, string, {
419
+ disabled: boolean;
420
+ labelWidth: string;
421
+ inline: boolean;
422
+ labelPosition: string;
423
+ config: schema_d_exports.FormConfig;
424
+ height: string;
425
+ initValues: Record<string, any>;
426
+ lastValues: Record<string, any>;
427
+ isCompare: boolean;
428
+ keyProp: string;
429
+ parentValues: Record<string, any>;
430
+ stepActive: string | number;
431
+ useFieldTextInError: boolean;
432
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
433
+ beforeCreate?: (() => void) | (() => void)[];
434
+ created?: (() => void) | (() => void)[];
435
+ beforeMount?: (() => void) | (() => void)[];
436
+ mounted?: (() => void) | (() => void)[];
437
+ beforeUpdate?: (() => void) | (() => void)[];
438
+ updated?: (() => void) | (() => void)[];
439
+ activated?: (() => void) | (() => void)[];
440
+ deactivated?: (() => void) | (() => void)[];
441
+ beforeDestroy?: (() => void) | (() => void)[];
442
+ beforeUnmount?: (() => void) | (() => void)[];
443
+ destroyed?: (() => void) | (() => void)[];
444
+ unmounted?: (() => void) | (() => void)[];
445
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
446
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
447
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
448
+ };
449
+ $forceUpdate: () => void;
450
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
451
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
452
+ } & Readonly<{
235
453
  disabled: boolean;
236
454
  labelWidth: string;
237
455
  inline: boolean;
@@ -244,14 +462,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
244
462
  keyProp: string;
245
463
  parentValues: Record<string, any>;
246
464
  stepActive: string | number;
247
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
248
- P: {};
249
- B: {};
250
- D: {};
251
- C: {};
252
- M: {};
253
- Defaults: {};
254
- }, Readonly<{
465
+ useFieldTextInError: boolean;
466
+ }> & Omit<Readonly<{
255
467
  config: schema_d_exports.FormConfig;
256
468
  initValues: Record<string, any>;
257
469
  lastValues?: Record<string, any>;
@@ -267,24 +479,158 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
267
479
  keyProp?: string;
268
480
  popperClass?: string;
269
481
  preventSubmitDefault?: boolean;
482
+ useFieldTextInError?: boolean;
270
483
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
484
+ showDiff?: (_data: {
485
+ curValue: any;
486
+ lastValue: any;
487
+ config: any;
488
+ }) => boolean;
489
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
271
490
  }> & Readonly<{
272
491
  onError?: ((...args: any[]) => any) | undefined;
273
492
  onChange?: ((...args: any[]) => any) | undefined;
274
493
  "onField-input"?: ((...args: any[]) => any) | undefined;
275
494
  "onField-change"?: ((...args: any[]) => any) | undefined;
276
495
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
277
- }>, {
278
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
279
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
496
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
497
+ values: schema_d_exports.FormValue;
498
+ lastValuesProcessed: schema_d_exports.FormValue;
280
499
  formState: schema_d_exports.FormState;
281
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
282
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
500
+ initialized: boolean;
501
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
283
502
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
284
503
  resetForm: () => void;
285
504
  submitForm: (native?: boolean) => Promise<any>;
286
505
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
287
- }, {}, {}, {}, {
506
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
507
+ $slots: import("@tmagic/editor").FormSlots;
508
+ }) | undefined, ({
509
+ $: import("@vue/runtime-core").ComponentInternalInstance;
510
+ $data: {};
511
+ $props: {
512
+ readonly config: schema_d_exports.FormConfig;
513
+ readonly initValues: Record<string, any>;
514
+ readonly lastValues?: Record<string, any> | undefined;
515
+ readonly isCompare?: boolean | undefined;
516
+ readonly parentValues?: Record<string, any> | undefined;
517
+ readonly labelWidth?: string | undefined;
518
+ readonly disabled?: boolean | undefined;
519
+ readonly height?: string | undefined;
520
+ readonly stepActive?: string | number | undefined;
521
+ readonly size?: "small" | "default" | "large" | undefined;
522
+ readonly inline?: boolean | undefined;
523
+ readonly labelPosition?: string | undefined;
524
+ readonly keyProp?: string | undefined;
525
+ readonly popperClass?: string | undefined;
526
+ readonly preventSubmitDefault?: boolean | undefined;
527
+ readonly useFieldTextInError?: boolean | undefined;
528
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
529
+ readonly showDiff?: ((_data: {
530
+ curValue: any;
531
+ lastValue: any;
532
+ config: any;
533
+ }) => boolean) | undefined;
534
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
535
+ readonly onError?: ((...args: any[]) => any) | undefined;
536
+ readonly onChange?: ((...args: any[]) => any) | undefined;
537
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
538
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
539
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
540
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
541
+ $attrs: import("@vue/runtime-core").Attrs;
542
+ $refs: {
543
+ [x: string]: unknown;
544
+ };
545
+ $slots: Readonly<{
546
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
547
+ }>;
548
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
549
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
550
+ $host: Element | null;
551
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
552
+ $el: any;
553
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
554
+ config: schema_d_exports.FormConfig;
555
+ initValues: Record<string, any>;
556
+ lastValues?: Record<string, any>;
557
+ isCompare?: boolean;
558
+ parentValues?: Record<string, any>;
559
+ labelWidth?: string;
560
+ disabled?: boolean;
561
+ height?: string;
562
+ stepActive?: string | number;
563
+ size?: "small" | "default" | "large";
564
+ inline?: boolean;
565
+ labelPosition?: string;
566
+ keyProp?: string;
567
+ popperClass?: string;
568
+ preventSubmitDefault?: boolean;
569
+ useFieldTextInError?: boolean;
570
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
571
+ showDiff?: (_data: {
572
+ curValue: any;
573
+ lastValue: any;
574
+ config: any;
575
+ }) => boolean;
576
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
577
+ }> & Readonly<{
578
+ onError?: ((...args: any[]) => any) | undefined;
579
+ onChange?: ((...args: any[]) => any) | undefined;
580
+ "onField-input"?: ((...args: any[]) => any) | undefined;
581
+ "onField-change"?: ((...args: any[]) => any) | undefined;
582
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
583
+ }>, {
584
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
585
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
586
+ formState: schema_d_exports.FormState;
587
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
588
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
589
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
590
+ resetForm: () => void;
591
+ submitForm: (native?: boolean) => Promise<any>;
592
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
593
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
594
+ error: (...args: any[]) => void;
595
+ change: (...args: any[]) => void;
596
+ "field-input": (...args: any[]) => void;
597
+ "field-change": (...args: any[]) => void;
598
+ "update:stepActive": (...args: any[]) => void;
599
+ }, string, {
600
+ disabled: boolean;
601
+ labelWidth: string;
602
+ inline: boolean;
603
+ labelPosition: string;
604
+ config: schema_d_exports.FormConfig;
605
+ height: string;
606
+ initValues: Record<string, any>;
607
+ lastValues: Record<string, any>;
608
+ isCompare: boolean;
609
+ keyProp: string;
610
+ parentValues: Record<string, any>;
611
+ stepActive: string | number;
612
+ useFieldTextInError: boolean;
613
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
614
+ beforeCreate?: (() => void) | (() => void)[];
615
+ created?: (() => void) | (() => void)[];
616
+ beforeMount?: (() => void) | (() => void)[];
617
+ mounted?: (() => void) | (() => void)[];
618
+ beforeUpdate?: (() => void) | (() => void)[];
619
+ updated?: (() => void) | (() => void)[];
620
+ activated?: (() => void) | (() => void)[];
621
+ deactivated?: (() => void) | (() => void)[];
622
+ beforeDestroy?: (() => void) | (() => void)[];
623
+ beforeUnmount?: (() => void) | (() => void)[];
624
+ destroyed?: (() => void) | (() => void)[];
625
+ unmounted?: (() => void) | (() => void)[];
626
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
627
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
628
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
629
+ };
630
+ $forceUpdate: () => void;
631
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
632
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
633
+ } & Readonly<{
288
634
  disabled: boolean;
289
635
  labelWidth: string;
290
636
  inline: boolean;
@@ -297,7 +643,8 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
297
643
  keyProp: string;
298
644
  parentValues: Record<string, any>;
299
645
  stepActive: string | number;
300
- }> | undefined, import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
646
+ useFieldTextInError: boolean;
647
+ }> & Omit<Readonly<{
301
648
  config: schema_d_exports.FormConfig;
302
649
  initValues: Record<string, any>;
303
650
  lastValues?: Record<string, any>;
@@ -313,96 +660,33 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
313
660
  keyProp?: string;
314
661
  popperClass?: string;
315
662
  preventSubmitDefault?: boolean;
663
+ useFieldTextInError?: boolean;
316
664
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
665
+ showDiff?: (_data: {
666
+ curValue: any;
667
+ lastValue: any;
668
+ config: any;
669
+ }) => boolean;
670
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
317
671
  }> & Readonly<{
318
672
  onError?: ((...args: any[]) => any) | undefined;
319
673
  onChange?: ((...args: any[]) => any) | undefined;
320
674
  "onField-input"?: ((...args: any[]) => any) | undefined;
321
675
  "onField-change"?: ((...args: any[]) => any) | undefined;
322
676
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
323
- }>, {
324
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
325
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
677
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
678
+ values: schema_d_exports.FormValue;
679
+ lastValuesProcessed: schema_d_exports.FormValue;
326
680
  formState: schema_d_exports.FormState;
327
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
328
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
681
+ initialized: boolean;
682
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
329
683
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
330
684
  resetForm: () => void;
331
685
  submitForm: (native?: boolean) => Promise<any>;
332
686
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
333
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
334
- error: (...args: any[]) => void;
335
- change: (...args: any[]) => void;
336
- "field-input": (...args: any[]) => void;
337
- "field-change": (...args: any[]) => void;
338
- "update:stepActive": (...args: any[]) => void;
339
- }, import("@vue/runtime-core").PublicProps, {
340
- disabled: boolean;
341
- labelWidth: string;
342
- inline: boolean;
343
- labelPosition: string;
344
- config: schema_d_exports.FormConfig;
345
- height: string;
346
- initValues: Record<string, any>;
347
- lastValues: Record<string, any>;
348
- isCompare: boolean;
349
- keyProp: string;
350
- parentValues: Record<string, any>;
351
- stepActive: string | number;
352
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
353
- P: {};
354
- B: {};
355
- D: {};
356
- C: {};
357
- M: {};
358
- Defaults: {};
359
- }, Readonly<{
360
- config: schema_d_exports.FormConfig;
361
- initValues: Record<string, any>;
362
- lastValues?: Record<string, any>;
363
- isCompare?: boolean;
364
- parentValues?: Record<string, any>;
365
- labelWidth?: string;
366
- disabled?: boolean;
367
- height?: string;
368
- stepActive?: string | number;
369
- size?: "small" | "default" | "large";
370
- inline?: boolean;
371
- labelPosition?: string;
372
- keyProp?: string;
373
- popperClass?: string;
374
- preventSubmitDefault?: boolean;
375
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
376
- }> & Readonly<{
377
- onError?: ((...args: any[]) => any) | undefined;
378
- onChange?: ((...args: any[]) => any) | undefined;
379
- "onField-input"?: ((...args: any[]) => any) | undefined;
380
- "onField-change"?: ((...args: any[]) => any) | undefined;
381
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
382
- }>, {
383
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
384
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
385
- formState: schema_d_exports.FormState;
386
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
387
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
388
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
389
- resetForm: () => void;
390
- submitForm: (native?: boolean) => Promise<any>;
391
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
392
- }, {}, {}, {}, {
393
- disabled: boolean;
394
- labelWidth: string;
395
- inline: boolean;
396
- labelPosition: string;
397
- config: schema_d_exports.FormConfig;
398
- height: string;
399
- initValues: Record<string, any>;
400
- lastValues: Record<string, any>;
401
- isCompare: boolean;
402
- keyProp: string;
403
- parentValues: Record<string, any>;
404
- stepActive: string | number;
405
- }> | undefined>;
687
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
688
+ $slots: import("@tmagic/editor").FormSlots;
689
+ }) | undefined>;
406
690
  saveFetch: import("@vue/reactivity").Ref<boolean, boolean>;
407
691
  dialogVisible: import("@vue/reactivity").Ref<boolean, boolean>;
408
692
  cancel: () => void;
@@ -426,12 +710,13 @@ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Pr
426
710
  destroyOnClose: boolean;
427
711
  showClose: boolean;
428
712
  config: schema_d_exports.FormConfig;
713
+ useFieldTextInError: boolean;
429
714
  confirmText: string;
430
715
  showCancel: boolean;
431
716
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
432
- declare const __VLS_export$29: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
717
+ declare const __VLS_export$29: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
433
718
  declare const _default$14: typeof __VLS_export$29;
434
- type __VLS_WithSlots$3<T, S> = T & {
719
+ type __VLS_WithSlots$4<T, S> = T & {
435
720
  new (): {
436
721
  $slots: S;
437
722
  };
@@ -452,59 +737,146 @@ type __VLS_Props$28 = {
452
737
  confirmText?: string;
453
738
  inline?: boolean;
454
739
  labelPosition?: string;
455
- preventSubmitDefault?: boolean; /** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
740
+ preventSubmitDefault?: boolean; /** 透传给内部 `MForm`,控制表单校验失败时错误提示前缀是否使用字段的 text 文案 */
741
+ useFieldTextInError?: boolean; /** 关闭前的回调,会暂停 Drawer 的关闭; done 是个 function type 接受一个 boolean 参数, 执行 done 使用 true 参数或不提供参数将会终止关闭 */
456
742
  beforeClose?: (_done: (_cancel?: boolean) => void) => void; /** 透传给内部 `MForm`,用于扩展 `formState`(如注入 `$message` / `$store` 等) */
457
743
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
458
744
  };
459
745
  declare var __VLS_23: {}, __VLS_38: {}, __VLS_46: {};
460
- type __VLS_Slots$2 = {} & {
746
+ type __VLS_Slots$3 = {} & {
461
747
  default?: (props: typeof __VLS_23) => any;
462
748
  } & {
463
749
  left?: (props: typeof __VLS_38) => any;
464
750
  } & {
465
751
  footer?: (props: typeof __VLS_46) => any;
466
752
  };
467
- declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Props$28, {
468
- form: import("@vue/reactivity").Ref<import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
469
- config: schema_d_exports.FormConfig;
470
- initValues: Record<string, any>;
471
- lastValues?: Record<string, any>;
472
- isCompare?: boolean;
473
- parentValues?: Record<string, any>;
474
- labelWidth?: string;
475
- disabled?: boolean;
476
- height?: string;
477
- stepActive?: string | number;
478
- size?: "small" | "default" | "large";
479
- inline?: boolean;
480
- labelPosition?: string;
481
- keyProp?: string;
482
- popperClass?: string;
483
- preventSubmitDefault?: boolean;
484
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
485
- }> & Readonly<{
486
- onError?: ((...args: any[]) => any) | undefined;
487
- onChange?: ((...args: any[]) => any) | undefined;
488
- "onField-input"?: ((...args: any[]) => any) | undefined;
489
- "onField-change"?: ((...args: any[]) => any) | undefined;
490
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
491
- }>, {
492
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
493
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
494
- formState: schema_d_exports.FormState;
495
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
496
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
497
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
498
- resetForm: () => void;
499
- submitForm: (native?: boolean) => Promise<any>;
500
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
501
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
502
- error: (...args: any[]) => void;
503
- change: (...args: any[]) => void;
504
- "field-input": (...args: any[]) => void;
505
- "field-change": (...args: any[]) => void;
506
- "update:stepActive": (...args: any[]) => void;
507
- }, import("@vue/runtime-core").PublicProps, {
753
+ declare const __VLS_base$3: import("@vue/runtime-core").DefineComponent<__VLS_Props$28, {
754
+ form: import("@vue/reactivity").Ref<({
755
+ $: import("@vue/runtime-core").ComponentInternalInstance;
756
+ $data: {};
757
+ $props: {
758
+ readonly config: schema_d_exports.FormConfig;
759
+ readonly initValues: Record<string, any>;
760
+ readonly lastValues?: Record<string, any> | undefined;
761
+ readonly isCompare?: boolean | undefined;
762
+ readonly parentValues?: Record<string, any> | undefined;
763
+ readonly labelWidth?: string | undefined;
764
+ readonly disabled?: boolean | undefined;
765
+ readonly height?: string | undefined;
766
+ readonly stepActive?: string | number | undefined;
767
+ readonly size?: "small" | "default" | "large" | undefined;
768
+ readonly inline?: boolean | undefined;
769
+ readonly labelPosition?: string | undefined;
770
+ readonly keyProp?: string | undefined;
771
+ readonly popperClass?: string | undefined;
772
+ readonly preventSubmitDefault?: boolean | undefined;
773
+ readonly useFieldTextInError?: boolean | undefined;
774
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
775
+ readonly showDiff?: ((_data: {
776
+ curValue: any;
777
+ lastValue: any;
778
+ config: any;
779
+ }) => boolean) | undefined;
780
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
781
+ readonly onError?: ((...args: any[]) => any) | undefined;
782
+ readonly onChange?: ((...args: any[]) => any) | undefined;
783
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
784
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
785
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
786
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
787
+ $attrs: import("@vue/runtime-core").Attrs;
788
+ $refs: {
789
+ [x: string]: unknown;
790
+ };
791
+ $slots: Readonly<{
792
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
793
+ }>;
794
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
795
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
796
+ $host: Element | null;
797
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
798
+ $el: any;
799
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
800
+ config: schema_d_exports.FormConfig;
801
+ initValues: Record<string, any>;
802
+ lastValues?: Record<string, any>;
803
+ isCompare?: boolean;
804
+ parentValues?: Record<string, any>;
805
+ labelWidth?: string;
806
+ disabled?: boolean;
807
+ height?: string;
808
+ stepActive?: string | number;
809
+ size?: "small" | "default" | "large";
810
+ inline?: boolean;
811
+ labelPosition?: string;
812
+ keyProp?: string;
813
+ popperClass?: string;
814
+ preventSubmitDefault?: boolean;
815
+ useFieldTextInError?: boolean;
816
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
817
+ showDiff?: (_data: {
818
+ curValue: any;
819
+ lastValue: any;
820
+ config: any;
821
+ }) => boolean;
822
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
823
+ }> & Readonly<{
824
+ onError?: ((...args: any[]) => any) | undefined;
825
+ onChange?: ((...args: any[]) => any) | undefined;
826
+ "onField-input"?: ((...args: any[]) => any) | undefined;
827
+ "onField-change"?: ((...args: any[]) => any) | undefined;
828
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
829
+ }>, {
830
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
831
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
832
+ formState: schema_d_exports.FormState;
833
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
834
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
835
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
836
+ resetForm: () => void;
837
+ submitForm: (native?: boolean) => Promise<any>;
838
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
839
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
840
+ error: (...args: any[]) => void;
841
+ change: (...args: any[]) => void;
842
+ "field-input": (...args: any[]) => void;
843
+ "field-change": (...args: any[]) => void;
844
+ "update:stepActive": (...args: any[]) => void;
845
+ }, string, {
846
+ disabled: boolean;
847
+ labelWidth: string;
848
+ inline: boolean;
849
+ labelPosition: string;
850
+ config: schema_d_exports.FormConfig;
851
+ height: string;
852
+ initValues: Record<string, any>;
853
+ lastValues: Record<string, any>;
854
+ isCompare: boolean;
855
+ keyProp: string;
856
+ parentValues: Record<string, any>;
857
+ stepActive: string | number;
858
+ useFieldTextInError: boolean;
859
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
860
+ beforeCreate?: (() => void) | (() => void)[];
861
+ created?: (() => void) | (() => void)[];
862
+ beforeMount?: (() => void) | (() => void)[];
863
+ mounted?: (() => void) | (() => void)[];
864
+ beforeUpdate?: (() => void) | (() => void)[];
865
+ updated?: (() => void) | (() => void)[];
866
+ activated?: (() => void) | (() => void)[];
867
+ deactivated?: (() => void) | (() => void)[];
868
+ beforeDestroy?: (() => void) | (() => void)[];
869
+ beforeUnmount?: (() => void) | (() => void)[];
870
+ destroyed?: (() => void) | (() => void)[];
871
+ unmounted?: (() => void) | (() => void)[];
872
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
873
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
874
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
875
+ };
876
+ $forceUpdate: () => void;
877
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
878
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
879
+ } & Readonly<{
508
880
  disabled: boolean;
509
881
  labelWidth: string;
510
882
  inline: boolean;
@@ -517,14 +889,8 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
517
889
  keyProp: string;
518
890
  parentValues: Record<string, any>;
519
891
  stepActive: string | number;
520
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
521
- P: {};
522
- B: {};
523
- D: {};
524
- C: {};
525
- M: {};
526
- Defaults: {};
527
- }, Readonly<{
892
+ useFieldTextInError: boolean;
893
+ }> & Omit<Readonly<{
528
894
  config: schema_d_exports.FormConfig;
529
895
  initValues: Record<string, any>;
530
896
  lastValues?: Record<string, any>;
@@ -540,24 +906,158 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
540
906
  keyProp?: string;
541
907
  popperClass?: string;
542
908
  preventSubmitDefault?: boolean;
909
+ useFieldTextInError?: boolean;
543
910
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
911
+ showDiff?: (_data: {
912
+ curValue: any;
913
+ lastValue: any;
914
+ config: any;
915
+ }) => boolean;
916
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
544
917
  }> & Readonly<{
545
918
  onError?: ((...args: any[]) => any) | undefined;
546
919
  onChange?: ((...args: any[]) => any) | undefined;
547
920
  "onField-input"?: ((...args: any[]) => any) | undefined;
548
921
  "onField-change"?: ((...args: any[]) => any) | undefined;
549
922
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
550
- }>, {
551
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
552
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
923
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
924
+ values: schema_d_exports.FormValue;
925
+ lastValuesProcessed: schema_d_exports.FormValue;
553
926
  formState: schema_d_exports.FormState;
554
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
555
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
927
+ initialized: boolean;
928
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
556
929
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
557
930
  resetForm: () => void;
558
931
  submitForm: (native?: boolean) => Promise<any>;
559
932
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
560
- }, {}, {}, {}, {
933
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
934
+ $slots: import("@tmagic/editor").FormSlots;
935
+ }) | undefined, ({
936
+ $: import("@vue/runtime-core").ComponentInternalInstance;
937
+ $data: {};
938
+ $props: {
939
+ readonly config: schema_d_exports.FormConfig;
940
+ readonly initValues: Record<string, any>;
941
+ readonly lastValues?: Record<string, any> | undefined;
942
+ readonly isCompare?: boolean | undefined;
943
+ readonly parentValues?: Record<string, any> | undefined;
944
+ readonly labelWidth?: string | undefined;
945
+ readonly disabled?: boolean | undefined;
946
+ readonly height?: string | undefined;
947
+ readonly stepActive?: string | number | undefined;
948
+ readonly size?: "small" | "default" | "large" | undefined;
949
+ readonly inline?: boolean | undefined;
950
+ readonly labelPosition?: string | undefined;
951
+ readonly keyProp?: string | undefined;
952
+ readonly popperClass?: string | undefined;
953
+ readonly preventSubmitDefault?: boolean | undefined;
954
+ readonly useFieldTextInError?: boolean | undefined;
955
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
956
+ readonly showDiff?: ((_data: {
957
+ curValue: any;
958
+ lastValue: any;
959
+ config: any;
960
+ }) => boolean) | undefined;
961
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
962
+ readonly onError?: ((...args: any[]) => any) | undefined;
963
+ readonly onChange?: ((...args: any[]) => any) | undefined;
964
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
965
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
966
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
967
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
968
+ $attrs: import("@vue/runtime-core").Attrs;
969
+ $refs: {
970
+ [x: string]: unknown;
971
+ };
972
+ $slots: Readonly<{
973
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
974
+ }>;
975
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
976
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
977
+ $host: Element | null;
978
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
979
+ $el: any;
980
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
981
+ config: schema_d_exports.FormConfig;
982
+ initValues: Record<string, any>;
983
+ lastValues?: Record<string, any>;
984
+ isCompare?: boolean;
985
+ parentValues?: Record<string, any>;
986
+ labelWidth?: string;
987
+ disabled?: boolean;
988
+ height?: string;
989
+ stepActive?: string | number;
990
+ size?: "small" | "default" | "large";
991
+ inline?: boolean;
992
+ labelPosition?: string;
993
+ keyProp?: string;
994
+ popperClass?: string;
995
+ preventSubmitDefault?: boolean;
996
+ useFieldTextInError?: boolean;
997
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
998
+ showDiff?: (_data: {
999
+ curValue: any;
1000
+ lastValue: any;
1001
+ config: any;
1002
+ }) => boolean;
1003
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1004
+ }> & Readonly<{
1005
+ onError?: ((...args: any[]) => any) | undefined;
1006
+ onChange?: ((...args: any[]) => any) | undefined;
1007
+ "onField-input"?: ((...args: any[]) => any) | undefined;
1008
+ "onField-change"?: ((...args: any[]) => any) | undefined;
1009
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
1010
+ }>, {
1011
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1012
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1013
+ formState: schema_d_exports.FormState;
1014
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
1015
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1016
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
1017
+ resetForm: () => void;
1018
+ submitForm: (native?: boolean) => Promise<any>;
1019
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
1020
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1021
+ error: (...args: any[]) => void;
1022
+ change: (...args: any[]) => void;
1023
+ "field-input": (...args: any[]) => void;
1024
+ "field-change": (...args: any[]) => void;
1025
+ "update:stepActive": (...args: any[]) => void;
1026
+ }, string, {
1027
+ disabled: boolean;
1028
+ labelWidth: string;
1029
+ inline: boolean;
1030
+ labelPosition: string;
1031
+ config: schema_d_exports.FormConfig;
1032
+ height: string;
1033
+ initValues: Record<string, any>;
1034
+ lastValues: Record<string, any>;
1035
+ isCompare: boolean;
1036
+ keyProp: string;
1037
+ parentValues: Record<string, any>;
1038
+ stepActive: string | number;
1039
+ useFieldTextInError: boolean;
1040
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
1041
+ beforeCreate?: (() => void) | (() => void)[];
1042
+ created?: (() => void) | (() => void)[];
1043
+ beforeMount?: (() => void) | (() => void)[];
1044
+ mounted?: (() => void) | (() => void)[];
1045
+ beforeUpdate?: (() => void) | (() => void)[];
1046
+ updated?: (() => void) | (() => void)[];
1047
+ activated?: (() => void) | (() => void)[];
1048
+ deactivated?: (() => void) | (() => void)[];
1049
+ beforeDestroy?: (() => void) | (() => void)[];
1050
+ beforeUnmount?: (() => void) | (() => void)[];
1051
+ destroyed?: (() => void) | (() => void)[];
1052
+ unmounted?: (() => void) | (() => void)[];
1053
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1054
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1055
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
1056
+ };
1057
+ $forceUpdate: () => void;
1058
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
1059
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
1060
+ } & Readonly<{
561
1061
  disabled: boolean;
562
1062
  labelWidth: string;
563
1063
  inline: boolean;
@@ -570,7 +1070,8 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
570
1070
  keyProp: string;
571
1071
  parentValues: Record<string, any>;
572
1072
  stepActive: string | number;
573
- }> | undefined, import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
1073
+ useFieldTextInError: boolean;
1074
+ }> & Omit<Readonly<{
574
1075
  config: schema_d_exports.FormConfig;
575
1076
  initValues: Record<string, any>;
576
1077
  lastValues?: Record<string, any>;
@@ -586,96 +1087,33 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
586
1087
  keyProp?: string;
587
1088
  popperClass?: string;
588
1089
  preventSubmitDefault?: boolean;
1090
+ useFieldTextInError?: boolean;
589
1091
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
1092
+ showDiff?: (_data: {
1093
+ curValue: any;
1094
+ lastValue: any;
1095
+ config: any;
1096
+ }) => boolean;
1097
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
590
1098
  }> & Readonly<{
591
1099
  onError?: ((...args: any[]) => any) | undefined;
592
1100
  onChange?: ((...args: any[]) => any) | undefined;
593
1101
  "onField-input"?: ((...args: any[]) => any) | undefined;
594
1102
  "onField-change"?: ((...args: any[]) => any) | undefined;
595
1103
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
596
- }>, {
597
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
598
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1104
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
1105
+ values: schema_d_exports.FormValue;
1106
+ lastValuesProcessed: schema_d_exports.FormValue;
599
1107
  formState: schema_d_exports.FormState;
600
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
601
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1108
+ initialized: boolean;
1109
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
602
1110
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
603
1111
  resetForm: () => void;
604
1112
  submitForm: (native?: boolean) => Promise<any>;
605
1113
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
606
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
607
- error: (...args: any[]) => void;
608
- change: (...args: any[]) => void;
609
- "field-input": (...args: any[]) => void;
610
- "field-change": (...args: any[]) => void;
611
- "update:stepActive": (...args: any[]) => void;
612
- }, import("@vue/runtime-core").PublicProps, {
613
- disabled: boolean;
614
- labelWidth: string;
615
- inline: boolean;
616
- labelPosition: string;
617
- config: schema_d_exports.FormConfig;
618
- height: string;
619
- initValues: Record<string, any>;
620
- lastValues: Record<string, any>;
621
- isCompare: boolean;
622
- keyProp: string;
623
- parentValues: Record<string, any>;
624
- stepActive: string | number;
625
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
626
- P: {};
627
- B: {};
628
- D: {};
629
- C: {};
630
- M: {};
631
- Defaults: {};
632
- }, Readonly<{
633
- config: schema_d_exports.FormConfig;
634
- initValues: Record<string, any>;
635
- lastValues?: Record<string, any>;
636
- isCompare?: boolean;
637
- parentValues?: Record<string, any>;
638
- labelWidth?: string;
639
- disabled?: boolean;
640
- height?: string;
641
- stepActive?: string | number;
642
- size?: "small" | "default" | "large";
643
- inline?: boolean;
644
- labelPosition?: string;
645
- keyProp?: string;
646
- popperClass?: string;
647
- preventSubmitDefault?: boolean;
648
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
649
- }> & Readonly<{
650
- onError?: ((...args: any[]) => any) | undefined;
651
- onChange?: ((...args: any[]) => any) | undefined;
652
- "onField-input"?: ((...args: any[]) => any) | undefined;
653
- "onField-change"?: ((...args: any[]) => any) | undefined;
654
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
655
- }>, {
656
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
657
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
658
- formState: schema_d_exports.FormState;
659
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
660
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
661
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
662
- resetForm: () => void;
663
- submitForm: (native?: boolean) => Promise<any>;
664
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
665
- }, {}, {}, {}, {
666
- disabled: boolean;
667
- labelWidth: string;
668
- inline: boolean;
669
- labelPosition: string;
670
- config: schema_d_exports.FormConfig;
671
- height: string;
672
- initValues: Record<string, any>;
673
- lastValues: Record<string, any>;
674
- isCompare: boolean;
675
- keyProp: string;
676
- parentValues: Record<string, any>;
677
- stepActive: string | number;
678
- }> | undefined>;
1114
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
1115
+ $slots: import("@tmagic/editor").FormSlots;
1116
+ }) | undefined>;
679
1117
  saveFetch: import("@vue/reactivity").Ref<boolean, boolean>;
680
1118
  bodyHeight: import("@vue/reactivity").Ref<number, number>;
681
1119
  show: () => void;
@@ -701,11 +1139,12 @@ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Pr
701
1139
  values: Object;
702
1140
  closeOnPressEscape: boolean;
703
1141
  config: schema_d_exports.FormConfig;
1142
+ useFieldTextInError: boolean;
704
1143
  confirmText: string;
705
1144
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
706
- declare const __VLS_export$28: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
1145
+ declare const __VLS_export$28: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
707
1146
  declare const _default$15: typeof __VLS_export$28;
708
- type __VLS_WithSlots$2<T, S> = T & {
1147
+ type __VLS_WithSlots$3<T, S> = T & {
709
1148
  new (): {
710
1149
  $slots: S;
711
1150
  };
@@ -724,111 +1163,145 @@ type __VLS_Props$27 = {
724
1163
  confirmText?: string;
725
1164
  inline?: boolean;
726
1165
  labelPosition?: string;
727
- preventSubmitDefault?: boolean;
1166
+ preventSubmitDefault?: boolean; /** 透传给内部 `MForm`,控制表单校验失败时错误提示前缀是否使用字段的 text 文案 */
1167
+ useFieldTextInError?: boolean;
728
1168
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
729
1169
  };
730
1170
  declare var __VLS_16$1: {}, __VLS_18$1: {}, __VLS_20: {};
731
- type __VLS_Slots$1 = {} & {
1171
+ type __VLS_Slots$2 = {} & {
732
1172
  default?: (props: typeof __VLS_16$1) => any;
733
1173
  } & {
734
1174
  left?: (props: typeof __VLS_18$1) => any;
735
1175
  } & {
736
1176
  footer?: (props: typeof __VLS_20) => any;
737
1177
  };
738
- declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {
739
- form: import("@vue/reactivity").Ref<import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
740
- config: schema_d_exports.FormConfig;
741
- initValues: Record<string, any>;
742
- lastValues?: Record<string, any>;
743
- isCompare?: boolean;
744
- parentValues?: Record<string, any>;
745
- labelWidth?: string;
746
- disabled?: boolean;
747
- height?: string;
748
- stepActive?: string | number;
749
- size?: "small" | "default" | "large";
750
- inline?: boolean;
751
- labelPosition?: string;
752
- keyProp?: string;
753
- popperClass?: string;
754
- preventSubmitDefault?: boolean;
755
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
756
- }> & Readonly<{
757
- onError?: ((...args: any[]) => any) | undefined;
758
- onChange?: ((...args: any[]) => any) | undefined;
759
- "onField-input"?: ((...args: any[]) => any) | undefined;
760
- "onField-change"?: ((...args: any[]) => any) | undefined;
761
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
762
- }>, {
763
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
764
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
765
- formState: schema_d_exports.FormState;
766
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
767
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
768
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
769
- resetForm: () => void;
770
- submitForm: (native?: boolean) => Promise<any>;
771
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
772
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
773
- error: (...args: any[]) => void;
774
- change: (...args: any[]) => void;
775
- "field-input": (...args: any[]) => void;
776
- "field-change": (...args: any[]) => void;
777
- "update:stepActive": (...args: any[]) => void;
778
- }, import("@vue/runtime-core").PublicProps, {
779
- disabled: boolean;
780
- labelWidth: string;
781
- inline: boolean;
782
- labelPosition: string;
783
- config: schema_d_exports.FormConfig;
784
- height: string;
785
- initValues: Record<string, any>;
786
- lastValues: Record<string, any>;
787
- isCompare: boolean;
788
- keyProp: string;
789
- parentValues: Record<string, any>;
790
- stepActive: string | number;
791
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
792
- P: {};
793
- B: {};
794
- D: {};
795
- C: {};
796
- M: {};
797
- Defaults: {};
798
- }, Readonly<{
799
- config: schema_d_exports.FormConfig;
800
- initValues: Record<string, any>;
801
- lastValues?: Record<string, any>;
802
- isCompare?: boolean;
803
- parentValues?: Record<string, any>;
804
- labelWidth?: string;
805
- disabled?: boolean;
806
- height?: string;
807
- stepActive?: string | number;
808
- size?: "small" | "default" | "large";
809
- inline?: boolean;
810
- labelPosition?: string;
811
- keyProp?: string;
812
- popperClass?: string;
813
- preventSubmitDefault?: boolean;
814
- extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
815
- }> & Readonly<{
816
- onError?: ((...args: any[]) => any) | undefined;
817
- onChange?: ((...args: any[]) => any) | undefined;
818
- "onField-input"?: ((...args: any[]) => any) | undefined;
819
- "onField-change"?: ((...args: any[]) => any) | undefined;
820
- "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
821
- }>, {
822
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
823
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
824
- formState: schema_d_exports.FormState;
825
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
826
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
827
- changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
828
- resetForm: () => void;
829
- submitForm: (native?: boolean) => Promise<any>;
830
- getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
831
- }, {}, {}, {}, {
1178
+ declare const __VLS_base$2: import("@vue/runtime-core").DefineComponent<__VLS_Props$27, {
1179
+ form: import("@vue/reactivity").Ref<({
1180
+ $: import("@vue/runtime-core").ComponentInternalInstance;
1181
+ $data: {};
1182
+ $props: {
1183
+ readonly config: schema_d_exports.FormConfig;
1184
+ readonly initValues: Record<string, any>;
1185
+ readonly lastValues?: Record<string, any> | undefined;
1186
+ readonly isCompare?: boolean | undefined;
1187
+ readonly parentValues?: Record<string, any> | undefined;
1188
+ readonly labelWidth?: string | undefined;
1189
+ readonly disabled?: boolean | undefined;
1190
+ readonly height?: string | undefined;
1191
+ readonly stepActive?: string | number | undefined;
1192
+ readonly size?: "small" | "default" | "large" | undefined;
1193
+ readonly inline?: boolean | undefined;
1194
+ readonly labelPosition?: string | undefined;
1195
+ readonly keyProp?: string | undefined;
1196
+ readonly popperClass?: string | undefined;
1197
+ readonly preventSubmitDefault?: boolean | undefined;
1198
+ readonly useFieldTextInError?: boolean | undefined;
1199
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
1200
+ readonly showDiff?: ((_data: {
1201
+ curValue: any;
1202
+ lastValue: any;
1203
+ config: any;
1204
+ }) => boolean) | undefined;
1205
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
1206
+ readonly onError?: ((...args: any[]) => any) | undefined;
1207
+ readonly onChange?: ((...args: any[]) => any) | undefined;
1208
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
1209
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
1210
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
1211
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
1212
+ $attrs: import("@vue/runtime-core").Attrs;
1213
+ $refs: {
1214
+ [x: string]: unknown;
1215
+ };
1216
+ $slots: Readonly<{
1217
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
1218
+ }>;
1219
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
1220
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
1221
+ $host: Element | null;
1222
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
1223
+ $el: any;
1224
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
1225
+ config: schema_d_exports.FormConfig;
1226
+ initValues: Record<string, any>;
1227
+ lastValues?: Record<string, any>;
1228
+ isCompare?: boolean;
1229
+ parentValues?: Record<string, any>;
1230
+ labelWidth?: string;
1231
+ disabled?: boolean;
1232
+ height?: string;
1233
+ stepActive?: string | number;
1234
+ size?: "small" | "default" | "large";
1235
+ inline?: boolean;
1236
+ labelPosition?: string;
1237
+ keyProp?: string;
1238
+ popperClass?: string;
1239
+ preventSubmitDefault?: boolean;
1240
+ useFieldTextInError?: boolean;
1241
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
1242
+ showDiff?: (_data: {
1243
+ curValue: any;
1244
+ lastValue: any;
1245
+ config: any;
1246
+ }) => boolean;
1247
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1248
+ }> & Readonly<{
1249
+ onError?: ((...args: any[]) => any) | undefined;
1250
+ onChange?: ((...args: any[]) => any) | undefined;
1251
+ "onField-input"?: ((...args: any[]) => any) | undefined;
1252
+ "onField-change"?: ((...args: any[]) => any) | undefined;
1253
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
1254
+ }>, {
1255
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1256
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1257
+ formState: schema_d_exports.FormState;
1258
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
1259
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1260
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
1261
+ resetForm: () => void;
1262
+ submitForm: (native?: boolean) => Promise<any>;
1263
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
1264
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1265
+ error: (...args: any[]) => void;
1266
+ change: (...args: any[]) => void;
1267
+ "field-input": (...args: any[]) => void;
1268
+ "field-change": (...args: any[]) => void;
1269
+ "update:stepActive": (...args: any[]) => void;
1270
+ }, string, {
1271
+ disabled: boolean;
1272
+ labelWidth: string;
1273
+ inline: boolean;
1274
+ labelPosition: string;
1275
+ config: schema_d_exports.FormConfig;
1276
+ height: string;
1277
+ initValues: Record<string, any>;
1278
+ lastValues: Record<string, any>;
1279
+ isCompare: boolean;
1280
+ keyProp: string;
1281
+ parentValues: Record<string, any>;
1282
+ stepActive: string | number;
1283
+ useFieldTextInError: boolean;
1284
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
1285
+ beforeCreate?: (() => void) | (() => void)[];
1286
+ created?: (() => void) | (() => void)[];
1287
+ beforeMount?: (() => void) | (() => void)[];
1288
+ mounted?: (() => void) | (() => void)[];
1289
+ beforeUpdate?: (() => void) | (() => void)[];
1290
+ updated?: (() => void) | (() => void)[];
1291
+ activated?: (() => void) | (() => void)[];
1292
+ deactivated?: (() => void) | (() => void)[];
1293
+ beforeDestroy?: (() => void) | (() => void)[];
1294
+ beforeUnmount?: (() => void) | (() => void)[];
1295
+ destroyed?: (() => void) | (() => void)[];
1296
+ unmounted?: (() => void) | (() => void)[];
1297
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1298
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1299
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
1300
+ };
1301
+ $forceUpdate: () => void;
1302
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
1303
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
1304
+ } & Readonly<{
832
1305
  disabled: boolean;
833
1306
  labelWidth: string;
834
1307
  inline: boolean;
@@ -841,7 +1314,8 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
841
1314
  keyProp: string;
842
1315
  parentValues: Record<string, any>;
843
1316
  stepActive: string | number;
844
- }> | undefined, import("@vue/runtime-core").CreateComponentPublicInstanceWithMixins<Readonly<{
1317
+ useFieldTextInError: boolean;
1318
+ }> & Omit<Readonly<{
845
1319
  config: schema_d_exports.FormConfig;
846
1320
  initValues: Record<string, any>;
847
1321
  lastValues?: Record<string, any>;
@@ -857,30 +1331,158 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
857
1331
  keyProp?: string;
858
1332
  popperClass?: string;
859
1333
  preventSubmitDefault?: boolean;
1334
+ useFieldTextInError?: boolean;
860
1335
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
1336
+ showDiff?: (_data: {
1337
+ curValue: any;
1338
+ lastValue: any;
1339
+ config: any;
1340
+ }) => boolean;
1341
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
861
1342
  }> & Readonly<{
862
1343
  onError?: ((...args: any[]) => any) | undefined;
863
1344
  onChange?: ((...args: any[]) => any) | undefined;
864
1345
  "onField-input"?: ((...args: any[]) => any) | undefined;
865
1346
  "onField-change"?: ((...args: any[]) => any) | undefined;
866
1347
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
867
- }>, {
868
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
869
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1348
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
1349
+ values: schema_d_exports.FormValue;
1350
+ lastValuesProcessed: schema_d_exports.FormValue;
870
1351
  formState: schema_d_exports.FormState;
871
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
872
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1352
+ initialized: boolean;
1353
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
873
1354
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
874
1355
  resetForm: () => void;
875
1356
  submitForm: (native?: boolean) => Promise<any>;
876
1357
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
877
- }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
878
- error: (...args: any[]) => void;
879
- change: (...args: any[]) => void;
880
- "field-input": (...args: any[]) => void;
881
- "field-change": (...args: any[]) => void;
882
- "update:stepActive": (...args: any[]) => void;
883
- }, import("@vue/runtime-core").PublicProps, {
1358
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
1359
+ $slots: import("@tmagic/editor").FormSlots;
1360
+ }) | undefined, ({
1361
+ $: import("@vue/runtime-core").ComponentInternalInstance;
1362
+ $data: {};
1363
+ $props: {
1364
+ readonly config: schema_d_exports.FormConfig;
1365
+ readonly initValues: Record<string, any>;
1366
+ readonly lastValues?: Record<string, any> | undefined;
1367
+ readonly isCompare?: boolean | undefined;
1368
+ readonly parentValues?: Record<string, any> | undefined;
1369
+ readonly labelWidth?: string | undefined;
1370
+ readonly disabled?: boolean | undefined;
1371
+ readonly height?: string | undefined;
1372
+ readonly stepActive?: string | number | undefined;
1373
+ readonly size?: "small" | "default" | "large" | undefined;
1374
+ readonly inline?: boolean | undefined;
1375
+ readonly labelPosition?: string | undefined;
1376
+ readonly keyProp?: string | undefined;
1377
+ readonly popperClass?: string | undefined;
1378
+ readonly preventSubmitDefault?: boolean | undefined;
1379
+ readonly useFieldTextInError?: boolean | undefined;
1380
+ readonly extendState?: ((_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
1381
+ readonly showDiff?: ((_data: {
1382
+ curValue: any;
1383
+ lastValue: any;
1384
+ config: any;
1385
+ }) => boolean) | undefined;
1386
+ readonly selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]) | undefined;
1387
+ readonly onError?: ((...args: any[]) => any) | undefined;
1388
+ readonly onChange?: ((...args: any[]) => any) | undefined;
1389
+ readonly "onField-input"?: ((...args: any[]) => any) | undefined;
1390
+ readonly "onField-change"?: ((...args: any[]) => any) | undefined;
1391
+ readonly "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
1392
+ } & import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps;
1393
+ $attrs: import("@vue/runtime-core").Attrs;
1394
+ $refs: {
1395
+ [x: string]: unknown;
1396
+ };
1397
+ $slots: Readonly<{
1398
+ [name: string]: import("@vue/runtime-core").Slot<any> | undefined;
1399
+ }>;
1400
+ $root: import("@vue/runtime-core").ComponentPublicInstance | null;
1401
+ $parent: import("@vue/runtime-core").ComponentPublicInstance | null;
1402
+ $host: Element | null;
1403
+ $emit: ((event: "error", ...args: any[]) => void) & ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void) & ((event: "update:stepActive", ...args: any[]) => void);
1404
+ $el: any;
1405
+ $options: import("@vue/runtime-core").ComponentOptionsBase<Readonly<{
1406
+ config: schema_d_exports.FormConfig;
1407
+ initValues: Record<string, any>;
1408
+ lastValues?: Record<string, any>;
1409
+ isCompare?: boolean;
1410
+ parentValues?: Record<string, any>;
1411
+ labelWidth?: string;
1412
+ disabled?: boolean;
1413
+ height?: string;
1414
+ stepActive?: string | number;
1415
+ size?: "small" | "default" | "large";
1416
+ inline?: boolean;
1417
+ labelPosition?: string;
1418
+ keyProp?: string;
1419
+ popperClass?: string;
1420
+ preventSubmitDefault?: boolean;
1421
+ useFieldTextInError?: boolean;
1422
+ extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
1423
+ showDiff?: (_data: {
1424
+ curValue: any;
1425
+ lastValue: any;
1426
+ config: any;
1427
+ }) => boolean;
1428
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
1429
+ }> & Readonly<{
1430
+ onError?: ((...args: any[]) => any) | undefined;
1431
+ onChange?: ((...args: any[]) => any) | undefined;
1432
+ "onField-input"?: ((...args: any[]) => any) | undefined;
1433
+ "onField-change"?: ((...args: any[]) => any) | undefined;
1434
+ "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
1435
+ }>, {
1436
+ values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1437
+ lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1438
+ formState: schema_d_exports.FormState;
1439
+ initialized: import("@vue/reactivity").Ref<boolean, boolean>;
1440
+ changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1441
+ changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
1442
+ resetForm: () => void;
1443
+ submitForm: (native?: boolean) => Promise<any>;
1444
+ getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
1445
+ }, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1446
+ error: (...args: any[]) => void;
1447
+ change: (...args: any[]) => void;
1448
+ "field-input": (...args: any[]) => void;
1449
+ "field-change": (...args: any[]) => void;
1450
+ "update:stepActive": (...args: any[]) => void;
1451
+ }, string, {
1452
+ disabled: boolean;
1453
+ labelWidth: string;
1454
+ inline: boolean;
1455
+ labelPosition: string;
1456
+ config: schema_d_exports.FormConfig;
1457
+ height: string;
1458
+ initValues: Record<string, any>;
1459
+ lastValues: Record<string, any>;
1460
+ isCompare: boolean;
1461
+ keyProp: string;
1462
+ parentValues: Record<string, any>;
1463
+ stepActive: string | number;
1464
+ useFieldTextInError: boolean;
1465
+ }, {}, string, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, import("@vue/runtime-core").ComponentProvideOptions> & {
1466
+ beforeCreate?: (() => void) | (() => void)[];
1467
+ created?: (() => void) | (() => void)[];
1468
+ beforeMount?: (() => void) | (() => void)[];
1469
+ mounted?: (() => void) | (() => void)[];
1470
+ beforeUpdate?: (() => void) | (() => void)[];
1471
+ updated?: (() => void) | (() => void)[];
1472
+ activated?: (() => void) | (() => void)[];
1473
+ deactivated?: (() => void) | (() => void)[];
1474
+ beforeDestroy?: (() => void) | (() => void)[];
1475
+ beforeUnmount?: (() => void) | (() => void)[];
1476
+ destroyed?: (() => void) | (() => void)[];
1477
+ unmounted?: (() => void) | (() => void)[];
1478
+ renderTracked?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1479
+ renderTriggered?: ((e: import("@vue/reactivity").DebuggerEvent) => void) | ((e: import("@vue/reactivity").DebuggerEvent) => void)[];
1480
+ errorCaptured?: ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("@vue/runtime-core").ComponentPublicInstance | null, info: string) => boolean | void)[];
1481
+ };
1482
+ $forceUpdate: () => void;
1483
+ $nextTick: typeof import("@vue/runtime-core").nextTick;
1484
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends ((...args: any) => infer R) ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("@vue/runtime-core").WatchOptions): import("@vue/reactivity").WatchStopHandle;
1485
+ } & Readonly<{
884
1486
  disabled: boolean;
885
1487
  labelWidth: string;
886
1488
  inline: boolean;
@@ -893,14 +1495,8 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
893
1495
  keyProp: string;
894
1496
  parentValues: Record<string, any>;
895
1497
  stepActive: string | number;
896
- }, false, {}, {}, import("@vue/runtime-core").GlobalComponents, import("@vue/runtime-core").GlobalDirectives, string, {}, any, import("@vue/runtime-core").ComponentProvideOptions, {
897
- P: {};
898
- B: {};
899
- D: {};
900
- C: {};
901
- M: {};
902
- Defaults: {};
903
- }, Readonly<{
1498
+ useFieldTextInError: boolean;
1499
+ }> & Omit<Readonly<{
904
1500
  config: schema_d_exports.FormConfig;
905
1501
  initValues: Record<string, any>;
906
1502
  lastValues?: Record<string, any>;
@@ -916,37 +1512,33 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
916
1512
  keyProp?: string;
917
1513
  popperClass?: string;
918
1514
  preventSubmitDefault?: boolean;
1515
+ useFieldTextInError?: boolean;
919
1516
  extendState?: (_state: schema_d_exports.FormState) => Record<string, any> | Promise<Record<string, any>>;
1517
+ showDiff?: (_data: {
1518
+ curValue: any;
1519
+ lastValue: any;
1520
+ config: any;
1521
+ }) => boolean;
1522
+ selfDiffFieldTypes?: string[] | ((_defaultTypes: string[]) => string[]);
920
1523
  }> & Readonly<{
921
1524
  onError?: ((...args: any[]) => any) | undefined;
922
1525
  onChange?: ((...args: any[]) => any) | undefined;
923
1526
  "onField-input"?: ((...args: any[]) => any) | undefined;
924
1527
  "onField-change"?: ((...args: any[]) => any) | undefined;
925
1528
  "onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
926
- }>, {
927
- values: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
928
- lastValuesProcessed: import("@vue/reactivity").Ref<schema_d_exports.FormValue, schema_d_exports.FormValue>;
1529
+ }>, "values" | "changeHandler" | "initialized" | "lastValuesProcessed" | "formState" | "changeRecords" | "resetForm" | "submitForm" | "getTextByName" | ("disabled" | "labelWidth" | "inline" | "labelPosition" | "config" | "height" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "stepActive" | "useFieldTextInError")> & {
1530
+ values: schema_d_exports.FormValue;
1531
+ lastValuesProcessed: schema_d_exports.FormValue;
929
1532
  formState: schema_d_exports.FormState;
930
- initialized: import("@vue/reactivity").Ref<boolean, boolean>;
931
- changeRecords: import("@vue/reactivity").ShallowRef<import("@tmagic/editor").ChangeRecord[], import("@tmagic/editor").ChangeRecord[]>;
1533
+ initialized: boolean;
1534
+ changeRecords: import("@tmagic/editor").ChangeRecord[];
932
1535
  changeHandler: (v: schema_d_exports.FormValue, eventData: ContainerChangeEventData) => void;
933
1536
  resetForm: () => void;
934
1537
  submitForm: (native?: boolean) => Promise<any>;
935
1538
  getTextByName: (name: string, config?: schema_d_exports.FormConfig) => string | undefined;
936
- }, {}, {}, {}, {
937
- disabled: boolean;
938
- labelWidth: string;
939
- inline: boolean;
940
- labelPosition: string;
941
- config: schema_d_exports.FormConfig;
942
- height: string;
943
- initValues: Record<string, any>;
944
- lastValues: Record<string, any>;
945
- isCompare: boolean;
946
- keyProp: string;
947
- parentValues: Record<string, any>;
948
- stepActive: string | number;
949
- }> | undefined>;
1539
+ } & {} & import("@vue/runtime-core").ComponentCustomProperties & {} & {
1540
+ $slots: import("@tmagic/editor").FormSlots;
1541
+ }) | undefined>;
950
1542
  saveFetch: import("@vue/reactivity").Ref<boolean, boolean>;
951
1543
  show: () => void;
952
1544
  hide: () => void;
@@ -961,17 +1553,19 @@ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Pr
961
1553
  }>, {
962
1554
  values: Object;
963
1555
  config: schema_d_exports.FormConfig;
1556
+ useFieldTextInError: boolean;
964
1557
  confirmText: string;
965
1558
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
966
- declare const __VLS_export$27: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
1559
+ declare const __VLS_export$27: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
967
1560
  declare const _default$13: typeof __VLS_export$27;
968
- type __VLS_WithSlots$1<T, S> = T & {
1561
+ type __VLS_WithSlots$2<T, S> = T & {
969
1562
  new (): {
970
1563
  $slots: S;
971
1564
  };
972
1565
  };
973
1566
  //#endregion
974
1567
  //#region temp/packages/form/src/containers/Container.vue.d.ts
1568
+ type __VLS_Slots$1 = FormSlots;
975
1569
  type __VLS_Props$26 = {
976
1570
  /** 表单值 */model: schema_d_exports.FormValue; /** 需对比的值(开启对比模式时传入) */
977
1571
  lastValues?: schema_d_exports.FormValue;
@@ -984,7 +1578,7 @@ type __VLS_Props$26 = {
984
1578
  size?: string; /** 是否开启对比模式 */
985
1579
  isCompare?: boolean;
986
1580
  };
987
- declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
1581
+ declare const __VLS_base$1: import("@vue/runtime-core").DefineComponent<__VLS_Props$26, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
988
1582
  change: (v: any, eventData: ContainerChangeEventData) => any;
989
1583
  addDiffCount: () => any;
990
1584
  }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props$26> & Readonly<{
@@ -997,7 +1591,13 @@ declare const __VLS_export$26: import("@vue/runtime-core").DefineComponent<__VLS
997
1591
  isCompare: boolean;
998
1592
  expandMore: boolean;
999
1593
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
1594
+ declare const __VLS_export$26: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
1000
1595
  declare const _default$4: typeof __VLS_export$26;
1596
+ type __VLS_WithSlots$1<T, S> = T & {
1597
+ new (): {
1598
+ $slots: S;
1599
+ };
1600
+ };
1001
1601
  //#endregion
1002
1602
  //#region temp/packages/form/src/containers/Fieldset.vue.d.ts
1003
1603
  type __VLS_Props$25 = {
@@ -1383,8 +1983,8 @@ declare const _default$31: {
1383
1983
  install(app: App, opt?: FormInstallOptions): void;
1384
1984
  };
1385
1985
  declare namespace index_d_exports {
1386
- export { ChangeRecord, ContainerChangeEventData, FormInstallOptions, _default as MCascader, _default$1 as MCheckbox, _default$2 as MCheckboxGroup, _default$3 as MColorPicker, _default$4 as MContainer, _default$5 as MDate, _default$6 as MDateTime, _default$7 as MDaterange, _default$8 as MDisplay, _default$9 as MDynamicField, _default$10 as MFieldset, _default$11 as MFlexLayout, _default$12 as MForm, _default$13 as MFormBox, _default$14 as MFormDialog, _default$15 as MFormDrawer, _default$16 as MGroupList, _default$17 as MHidden, _default$18 as MLink, _default$19 as MNumber, _default$20 as MNumberRange, _default$21 as MPanel, _default$22 as MRadioGroup, _default$23 as MRow, _default$24 as MSelect, _default$25 as MSwitch, _default$16 as MTable, _default$16 as MTableGroupList, _default$26 as MTabs, _default$27 as MText, _default$28 as MTextarea, _default$29 as MTime, _default$30 as MTimerange, SubmitFormOptions, ValidateError, createForm, createObjectProp, createValues, datetimeFormatter, _default$31 as default, deleteField as deleteFormField, display, filterFunction, getDataByPage, getField as getFormField, getRules, initValue, registerField as registerFormField, sortArray, sortChange, submitForm, useAddField };
1986
+ export { ChangeRecord, ContainerChangeEventData, FORM_DIFF_CONFIG_KEY, FormDiffConfig, FormInstallOptions, FormLabelSlotProps, FormSlots, _default as MCascader, _default$1 as MCheckbox, _default$2 as MCheckboxGroup, _default$3 as MColorPicker, _default$4 as MContainer, _default$5 as MDate, _default$6 as MDateTime, _default$7 as MDaterange, _default$8 as MDisplay, _default$9 as MDynamicField, _default$10 as MFieldset, _default$11 as MFlexLayout, _default$12 as MForm, _default$13 as MFormBox, _default$14 as MFormDialog, _default$15 as MFormDrawer, _default$16 as MGroupList, _default$17 as MHidden, _default$18 as MLink, _default$19 as MNumber, _default$20 as MNumberRange, _default$21 as MPanel, _default$22 as MRadioGroup, _default$23 as MRow, _default$24 as MSelect, _default$25 as MSwitch, _default$16 as MTable, _default$16 as MTableGroupList, _default$26 as MTabs, _default$27 as MText, _default$28 as MTextarea, _default$29 as MTime, _default$30 as MTimerange, SubmitFormOptions, SubmitFormResult, ValidateError, createForm, createObjectProp, createValues, datetimeFormatter, _default$31 as default, deleteField as deleteFormField, display, filterFunction, getDataByPage, getField as getFormField, getRules, initValue, registerField as registerFormField, sortArray, sortChange, submitForm, useAddField };
1387
1987
  }
1388
1988
  declare const createForm: <T extends [] = []>(config: schema_d_exports.FormConfig | T) => schema_d_exports.FormConfig | T;
1389
1989
  //#endregion
1390
- export { ChangeRecord, ContainerChangeEventData, type FormInstallOptions, _default as MCascader, _default$1 as MCheckbox, _default$2 as MCheckboxGroup, _default$3 as MColorPicker, _default$4 as MContainer, _default$5 as MDate, _default$6 as MDateTime, _default$7 as MDaterange, _default$8 as MDisplay, _default$9 as MDynamicField, _default$10 as MFieldset, _default$11 as MFlexLayout, _default$12 as MForm, _default$13 as MFormBox, _default$14 as MFormDialog, _default$15 as MFormDrawer, _default$16 as MGroupList, _default$16 as MTable, _default$16 as MTableGroupList, _default$17 as MHidden, _default$18 as MLink, _default$19 as MNumber, _default$20 as MNumberRange, _default$21 as MPanel, _default$22 as MRadioGroup, _default$23 as MRow, _default$24 as MSelect, _default$25 as MSwitch, _default$26 as MTabs, _default$27 as MText, _default$28 as MTextarea, _default$29 as MTime, _default$30 as MTimerange, SubmitFormOptions, ValidateError, createForm, createObjectProp, createValues, datetimeFormatter, _default$31 as default, deleteField as deleteFormField, display, filterFunction, getDataByPage, getField as getFormField, getRules, initValue, registerField as registerFormField, sortArray, sortChange, submitForm, useAddField };
1990
+ export { ChangeRecord, ContainerChangeEventData, FORM_DIFF_CONFIG_KEY, FormDiffConfig, type FormInstallOptions, FormLabelSlotProps, FormSlots, _default as MCascader, _default$1 as MCheckbox, _default$2 as MCheckboxGroup, _default$3 as MColorPicker, _default$4 as MContainer, _default$5 as MDate, _default$6 as MDateTime, _default$7 as MDaterange, _default$8 as MDisplay, _default$9 as MDynamicField, _default$10 as MFieldset, _default$11 as MFlexLayout, _default$12 as MForm, _default$13 as MFormBox, _default$14 as MFormDialog, _default$15 as MFormDrawer, _default$16 as MGroupList, _default$16 as MTable, _default$16 as MTableGroupList, _default$17 as MHidden, _default$18 as MLink, _default$19 as MNumber, _default$20 as MNumberRange, _default$21 as MPanel, _default$22 as MRadioGroup, _default$23 as MRow, _default$24 as MSelect, _default$25 as MSwitch, _default$26 as MTabs, _default$27 as MText, _default$28 as MTextarea, _default$29 as MTime, _default$30 as MTimerange, SubmitFormOptions, SubmitFormResult, ValidateError, createForm, createObjectProp, createValues, datetimeFormatter, _default$31 as default, deleteField as deleteFormField, display, filterFunction, getDataByPage, getField as getFormField, getRules, initValue, registerField as registerFormField, sortArray, sortChange, submitForm, useAddField };