@tmagic/form 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.6",
2
+ "version": "1.3.8",
3
3
  "name": "@tmagic/form",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -23,11 +23,6 @@
23
23
  "./*": "./*"
24
24
  },
25
25
  "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "npm run build:type && vite build",
28
- "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json",
29
- "clear:type": "rimraf ./types"
30
- },
31
26
  "engines": {
32
27
  "node": ">=18"
33
28
  },
@@ -37,8 +32,8 @@
37
32
  },
38
33
  "dependencies": {
39
34
  "@element-plus/icons-vue": "^2.3.1",
40
- "@tmagic/design": "1.3.6",
41
- "@tmagic/utils": "1.3.6",
35
+ "@tmagic/design": "1.3.8",
36
+ "@tmagic/utils": "1.3.8",
42
37
  "lodash-es": "^4.17.21",
43
38
  "sortablejs": "^1.14.0",
44
39
  "vue": "^3.3.8"
@@ -59,5 +54,10 @@
59
54
  "typescript": "^5.0.4",
60
55
  "vite": "^5.0.7",
61
56
  "vue-tsc": "^1.8.25"
57
+ },
58
+ "scripts": {
59
+ "build": "npm run build:type && vite build",
60
+ "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json",
61
+ "clear:type": "rimraf ./types"
62
62
  }
63
- }
63
+ }
package/src/Form.vue CHANGED
@@ -79,7 +79,7 @@ const props = withDefaults(
79
79
  },
80
80
  );
81
81
 
82
- const emit = defineEmits(['change', 'field-input', 'field-change']);
82
+ const emit = defineEmits(['change', 'error', 'field-input', 'field-change']);
83
83
 
84
84
  const tMagicForm = ref<InstanceType<typeof TMagicForm>>();
85
85
  const initialized = ref(false);
@@ -182,6 +182,8 @@ defineExpose({
182
182
  await tMagicForm.value?.validate();
183
183
  return native ? values.value : cloneDeep(toRaw(values.value));
184
184
  } catch (invalidFields: any) {
185
+ emit('error', invalidFields);
186
+
185
187
  const error: string[] = [];
186
188
 
187
189
  Object.entries(invalidFields).forEach(([, ValidateError]) => {
@@ -191,6 +193,7 @@ defineExpose({
191
193
  if (!field && message) error.push(`${message}`);
192
194
  });
193
195
  });
196
+
194
197
  throw new Error(error.join('<br>'));
195
198
  }
196
199
  },
@@ -2,6 +2,7 @@
2
2
  <div
3
3
  v-if="config"
4
4
  :id="config.id"
5
+ :data-magic-id="config.id"
5
6
  :style="config.tip ? 'display: flex;align-items: baseline;' : ''"
6
7
  :class="`m-form-container m-container-${type || ''} ${config.className || ''}`"
7
8
  >
@@ -1,180 +1,182 @@
1
1
  <template>
2
- <div ref="mTable" class="m-fields-table" :class="{ 'm-fields-table-item-extra': config.itemExtra }">
3
- <span v-if="config.extra" style="color: rgba(0, 0, 0, 0.45)" v-html="config.extra"></span>
4
- <TMagicTooltip content="拖拽可排序" placement="left-start" :disabled="config.dropSort !== true">
5
- <TMagicTable
6
- v-if="model[modelName]"
7
- ref="tMagicTable"
8
- style="width: 100%"
9
- :row-key="config.rowKey || 'id'"
10
- :data="data"
11
- :lastData="lastData"
12
- :border="config.border"
13
- :max-height="config.maxHeight"
14
- :default-expand-all="true"
15
- :key="updateKey"
16
- @select="selectHandle"
17
- @sort-change="sortChange"
18
- >
19
- <TMagicTableColumn v-if="config.itemExtra" :fixed="'left'" width="30" type="expand">
20
- <template v-slot="scope">
21
- <span v-html="itemExtra(config.itemExtra, scope.$index)" class="m-form-tip"></span>
22
- </template>
23
- </TMagicTableColumn>
24
-
25
- <TMagicTableColumn
26
- label="操作"
27
- :width="config.operateColWidth || 55"
28
- align="center"
29
- :fixed="config.fixed === false ? undefined : 'left'"
2
+ <teleport to="body" :disabled="!isFullscreen">
3
+ <div ref="mTable" class="m-fields-table" :class="{ 'm-fields-table-item-extra': config.itemExtra }">
4
+ <span v-if="config.extra" style="color: rgba(0, 0, 0, 0.45)" v-html="config.extra"></span>
5
+ <TMagicTooltip content="拖拽可排序" placement="left-start" :disabled="config.dropSort !== true">
6
+ <TMagicTable
7
+ v-if="model[modelName]"
8
+ ref="tMagicTable"
9
+ style="width: 100%"
10
+ :row-key="config.rowKey || 'id'"
11
+ :data="data"
12
+ :lastData="lastData"
13
+ :border="config.border"
14
+ :max-height="config.maxHeight"
15
+ :default-expand-all="true"
16
+ :key="updateKey"
17
+ @select="selectHandle"
18
+ @sort-change="sortChange"
30
19
  >
31
- <template v-slot="scope">
32
- <slot name="operateCol" :scope="scope"></slot>
33
- <TMagicIcon
34
- v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
35
- class="m-table-delete-icon"
36
- @click="removeHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
37
- ><Delete
38
- /></TMagicIcon>
39
- </template>
40
- </TMagicTableColumn>
41
-
42
- <TMagicTableColumn v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="60">
43
- <template v-slot="scope">
44
- <TMagicTooltip
45
- v-if="scope.$index + 1 + pagecontext * pagesize - 1 !== 0"
46
- content="点击上移,双击置顶"
47
- placement="top"
48
- >
49
- <TMagicButton
50
- plain
51
- size="small"
52
- type="primary"
53
- :icon="ArrowUp"
54
- :disabled="disabled"
55
- text
56
- @click="upHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
57
- @dblclick="topHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
58
- ></TMagicButton>
59
- </TMagicTooltip>
60
- <TMagicTooltip
61
- v-if="scope.$index + 1 + pagecontext * pagesize - 1 !== model[modelName].length - 1"
62
- content="点击下移,双击置底"
63
- placement="top"
64
- >
65
- <TMagicButton
66
- plain
67
- size="small"
68
- type="primary"
69
- :icon="ArrowDown"
70
- :disabled="disabled"
71
- text
72
- @click="downHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
73
- @dblclick="bottomHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
74
- ></TMagicButton>
75
- </TMagicTooltip>
76
- </template>
77
- </TMagicTableColumn>
78
-
79
- <TMagicTableColumn
80
- v-if="selection"
81
- align="center"
82
- header-align="center"
83
- type="selection"
84
- width="45"
85
- ></TMagicTableColumn>
86
-
87
- <TMagicTableColumn width="60" label="序号" v-if="showIndex && config.showIndex">
88
- <template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
89
- </TMagicTableColumn>
20
+ <TMagicTableColumn v-if="config.itemExtra" :fixed="'left'" width="30" type="expand">
21
+ <template v-slot="scope">
22
+ <span v-html="itemExtra(config.itemExtra, scope.$index)" class="m-form-tip"></span>
23
+ </template>
24
+ </TMagicTableColumn>
90
25
 
91
- <template v-for="(column, index) in config.items">
92
26
  <TMagicTableColumn
93
- v-if="column.type !== 'hidden' && display(column.display)"
94
- :prop="column.name"
95
- :width="column.width"
96
- :label="column.label"
97
- :sortable="column.sortable"
98
- :sort-orders="['ascending', 'descending']"
99
- :key="column[mForm?.keyProp || '__key'] ?? index"
100
- :class-name="config.dropSort === true ? 'el-table__column--dropable' : ''"
27
+ label="操作"
28
+ :width="config.operateColWidth || 55"
29
+ align="center"
30
+ :fixed="config.fixed === false ? undefined : 'left'"
101
31
  >
102
- <template #default="scope">
103
- <Container
104
- v-if="scope.$index > -1"
105
- labelWidth="0"
106
- :disabled="disabled"
107
- :prop="getProp(scope.$index)"
108
- :rules="column.rules"
109
- :config="makeConfig(column, scope.row)"
110
- :model="scope.row"
111
- :lastValues="lastData[scope.$index]"
112
- :is-compare="isCompare"
113
- :size="size"
114
- @change="$emit('change', model[modelName])"
115
- @addDiffCount="onAddDiffCount()"
116
- ></Container>
32
+ <template v-slot="scope">
33
+ <slot name="operateCol" :scope="scope"></slot>
34
+ <TMagicIcon
35
+ v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
36
+ class="m-table-delete-icon"
37
+ @click="removeHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
38
+ ><Delete
39
+ /></TMagicIcon>
117
40
  </template>
118
41
  </TMagicTableColumn>
119
- </template>
120
- </TMagicTable>
121
- </TMagicTooltip>
122
- <slot></slot>
123
-
124
- <div style="display: flex; justify-content: space-between; margin: 10px 0">
125
- <TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
126
- >新增一行</TMagicButton
127
- >
128
-
129
- <div style="display: flex">
130
- <TMagicButton
131
- :icon="Grid"
132
- size="small"
133
- type="primary"
134
- @click="toggleMode"
135
- v-if="enableToggleMode && config.enableToggleMode !== false && !isFullscreen"
136
- >展开配置</TMagicButton
137
- >
138
- <TMagicButton
139
- :icon="FullScreen"
140
- size="small"
141
- type="primary"
142
- @click="toggleFullscreen"
143
- v-if="config.enableFullscreen !== false"
144
- >
145
- {{ isFullscreen ? '退出全屏' : '全屏编辑' }}
146
- </TMagicButton>
147
- <TMagicUpload
148
- v-if="importable"
149
- style="display: inline-block"
150
- ref="excelBtn"
151
- action="/noop"
152
- :disabled="disabled"
153
- :on-change="excelHandler"
154
- :auto-upload="false"
155
- >
156
- <TMagicButton size="small" type="success" :disabled="disabled" plain>导入EXCEL</TMagicButton>
157
- </TMagicUpload>
158
- <TMagicButton v-if="importable" size="small" type="warning" :disabled="disabled" plain @click="clearHandler()"
159
- >清空</TMagicButton
42
+
43
+ <TMagicTableColumn v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="60">
44
+ <template v-slot="scope">
45
+ <TMagicTooltip
46
+ v-if="scope.$index + 1 + pagecontext * pagesize - 1 !== 0"
47
+ content="点击上移,双击置顶"
48
+ placement="top"
49
+ >
50
+ <TMagicButton
51
+ plain
52
+ size="small"
53
+ type="primary"
54
+ :icon="ArrowUp"
55
+ :disabled="disabled"
56
+ text
57
+ @click="upHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
58
+ @dblclick="topHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
59
+ ></TMagicButton>
60
+ </TMagicTooltip>
61
+ <TMagicTooltip
62
+ v-if="scope.$index + 1 + pagecontext * pagesize - 1 !== model[modelName].length - 1"
63
+ content="点击下移,双击置底"
64
+ placement="top"
65
+ >
66
+ <TMagicButton
67
+ plain
68
+ size="small"
69
+ type="primary"
70
+ :icon="ArrowDown"
71
+ :disabled="disabled"
72
+ text
73
+ @click="downHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
74
+ @dblclick="bottomHandler(scope.$index + 1 + pagecontext * pagesize - 1)"
75
+ ></TMagicButton>
76
+ </TMagicTooltip>
77
+ </template>
78
+ </TMagicTableColumn>
79
+
80
+ <TMagicTableColumn
81
+ v-if="selection"
82
+ align="center"
83
+ header-align="center"
84
+ type="selection"
85
+ width="45"
86
+ ></TMagicTableColumn>
87
+
88
+ <TMagicTableColumn width="60" label="序号" v-if="showIndex && config.showIndex">
89
+ <template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
90
+ </TMagicTableColumn>
91
+
92
+ <template v-for="(column, index) in config.items">
93
+ <TMagicTableColumn
94
+ v-if="column.type !== 'hidden' && display(column.display)"
95
+ :prop="column.name"
96
+ :width="column.width"
97
+ :label="column.label"
98
+ :sortable="column.sortable"
99
+ :sort-orders="['ascending', 'descending']"
100
+ :key="column[mForm?.keyProp || '__key'] ?? index"
101
+ :class-name="config.dropSort === true ? 'el-table__column--dropable' : ''"
102
+ >
103
+ <template #default="scope">
104
+ <Container
105
+ v-if="scope.$index > -1"
106
+ labelWidth="0"
107
+ :disabled="disabled"
108
+ :prop="getProp(scope.$index)"
109
+ :rules="column.rules"
110
+ :config="makeConfig(column, scope.row)"
111
+ :model="scope.row"
112
+ :lastValues="lastData[scope.$index]"
113
+ :is-compare="isCompare"
114
+ :size="size"
115
+ @change="$emit('change', model[modelName])"
116
+ @addDiffCount="onAddDiffCount()"
117
+ ></Container>
118
+ </template>
119
+ </TMagicTableColumn>
120
+ </template>
121
+ </TMagicTable>
122
+ </TMagicTooltip>
123
+ <slot></slot>
124
+
125
+ <div style="display: flex; justify-content: space-between; margin: 10px 0">
126
+ <TMagicButton v-if="addable" size="small" type="primary" :disabled="disabled" plain @click="newHandler()"
127
+ >新增一行</TMagicButton
160
128
  >
129
+
130
+ <div style="display: flex">
131
+ <TMagicButton
132
+ :icon="Grid"
133
+ size="small"
134
+ type="primary"
135
+ @click="toggleMode"
136
+ v-if="enableToggleMode && config.enableToggleMode !== false && !isFullscreen"
137
+ >展开配置</TMagicButton
138
+ >
139
+ <TMagicButton
140
+ :icon="FullScreen"
141
+ size="small"
142
+ type="primary"
143
+ @click="toggleFullscreen"
144
+ v-if="config.enableFullscreen !== false"
145
+ >
146
+ {{ isFullscreen ? '退出全屏' : '全屏编辑' }}
147
+ </TMagicButton>
148
+ <TMagicUpload
149
+ v-if="importable"
150
+ style="display: inline-block"
151
+ ref="excelBtn"
152
+ action="/noop"
153
+ :disabled="disabled"
154
+ :on-change="excelHandler"
155
+ :auto-upload="false"
156
+ >
157
+ <TMagicButton size="small" type="success" :disabled="disabled" plain>导入EXCEL</TMagicButton>
158
+ </TMagicUpload>
159
+ <TMagicButton v-if="importable" size="small" type="warning" :disabled="disabled" plain @click="clearHandler()"
160
+ >清空</TMagicButton
161
+ >
162
+ </div>
161
163
  </div>
162
- </div>
163
164
 
164
- <div class="bottom" style="text-align: right" v-if="config.pagination">
165
- <TMagicPagination
166
- layout="total, sizes, prev, pager, next, jumper"
167
- :hide-on-single-page="model[modelName].length < pagesize"
168
- :current-page="pagecontext + 1"
169
- :page-sizes="[pagesize, 60, 120, 300]"
170
- :page-size="pagesize"
171
- :total="model[modelName].length"
172
- @size-change="handleSizeChange"
173
- @current-change="handleCurrentChange"
174
- >
175
- </TMagicPagination>
165
+ <div class="bottom" style="text-align: right" v-if="config.pagination">
166
+ <TMagicPagination
167
+ layout="total, sizes, prev, pager, next, jumper"
168
+ :hide-on-single-page="model[modelName].length < pagesize"
169
+ :current-page="pagecontext + 1"
170
+ :page-sizes="[pagesize, 60, 120, 300]"
171
+ :page-size="pagesize"
172
+ :total="model[modelName].length"
173
+ @size-change="handleSizeChange"
174
+ @current-change="handleCurrentChange"
175
+ >
176
+ </TMagicPagination>
177
+ </div>
176
178
  </div>
177
- </div>
179
+ </teleport>
178
180
  </template>
179
181
 
180
182
  <script setup lang="ts">
@@ -323,6 +325,15 @@ const newHandler = async (row?: any) => {
323
325
  return;
324
326
  }
325
327
 
328
+ if (typeof props.config.beforeAddRow === 'function') {
329
+ const beforeCheckRes = props.config.beforeAddRow(mForm, {
330
+ model: props.model[modelName.value],
331
+ formValue: mForm?.values,
332
+ prop: props.prop,
333
+ });
334
+ if (!beforeCheckRes) return;
335
+ }
336
+
326
337
  const columns = props.config.items;
327
338
  const enumValues = props.config.enum || [];
328
339
  let enumV = [];
@@ -26,7 +26,7 @@
26
26
  </template>
27
27
 
28
28
  <script lang="ts" setup>
29
- import { inject, onBeforeMount, Ref, ref, watch, watchEffect } from 'vue';
29
+ import { inject, nextTick, onBeforeMount, Ref, ref, watch, watchEffect } from 'vue';
30
30
 
31
31
  import { TMagicSelect } from '@tmagic/design';
32
32
  import { getValueByKeyPath } from '@tmagic/utils';
@@ -331,12 +331,15 @@ if (typeof props.config.options === 'function') {
331
331
  }
332
332
 
333
333
  if (props.config.remote) {
334
- const unWacth = watch(
334
+ const unWatch = watch(
335
335
  () => tMagicSelect.value?.scrollbarWrap,
336
336
  (scrollbarWrap) => {
337
337
  if (!scrollbarWrap) {
338
338
  return;
339
339
  }
340
+
341
+ nextTick(() => unWatch());
342
+
340
343
  scrollbarWrap.addEventListener('scroll', async (e: Event) => {
341
344
  const el = e.currentTarget as HTMLDivElement;
342
345
  if (moreLoadingVisible.value) {
@@ -353,7 +356,6 @@ if (props.config.remote) {
353
356
  options.value = await getOptions();
354
357
  moreLoadingVisible.value = false;
355
358
  });
356
- unWacth();
357
359
  },
358
360
  {
359
361
  immediate: true,
package/src/schema.ts CHANGED
@@ -669,6 +669,8 @@ export interface TableConfig extends FormItem {
669
669
  fixed?: boolean;
670
670
  itemExtra?: string | FilterFunction<string>;
671
671
  rowKey?: string;
672
+ /** table 新增行时前置回调 */
673
+ beforeAddRow?: (mForm: FormState | undefined, data: any) => boolean;
672
674
  }
673
675
 
674
676
  export interface GroupListConfig extends FormItem {
@@ -2,22 +2,15 @@
2
2
  width: 100%;
3
3
  &.fixed {
4
4
  position: fixed;
5
+ height: 100%;
6
+ overflow: auto;
5
7
  top: 0;
6
8
  right: 0;
7
9
  left: 0;
8
10
  bottom: 0;
9
11
  z-index: 100;
10
- &::before {
11
- content: " ";
12
- display: block;
13
- background: rgba(0, 0, 0, 0.5);
14
- position: fixed;
15
- top: 0;
16
- right: 0;
17
- left: 0;
18
- bottom: 0;
19
- z-index: 100;
20
- }
12
+ background: rgba(0, 0, 0, 0.5);
13
+
21
14
  & > .el-form-item__content {
22
15
  z-index: 101;
23
16
  position: relative;
@@ -42,6 +42,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
42
42
  submitForm: (native?: boolean | undefined) => Promise<any>;
43
43
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
44
  change: (...args: any[]) => void;
45
+ error: (...args: any[]) => void;
45
46
  "field-input": (...args: any[]) => void;
46
47
  "field-change": (...args: any[]) => void;
47
48
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -79,6 +80,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
79
80
  keyProp: string;
80
81
  }>>> & {
81
82
  onChange?: ((...args: any[]) => any) | undefined;
83
+ onError?: ((...args: any[]) => any) | undefined;
82
84
  "onField-input"?: ((...args: any[]) => any) | undefined;
83
85
  "onField-change"?: ((...args: any[]) => any) | undefined;
84
86
  }, {
@@ -48,6 +48,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
48
48
  readonly size?: "large" | "default" | "small" | undefined;
49
49
  readonly extendState?: ((state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
50
50
  onChange?: ((...args: any[]) => any) | undefined;
51
+ onError?: ((...args: any[]) => any) | undefined;
51
52
  "onField-input"?: ((...args: any[]) => any) | undefined;
52
53
  "onField-change"?: ((...args: any[]) => any) | undefined;
53
54
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
@@ -112,6 +113,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
112
113
  };
113
114
  }>> & {
114
115
  onChange?: ((...args: any[]) => any) | undefined;
116
+ onError?: ((...args: any[]) => any) | undefined;
115
117
  "onField-input"?: ((...args: any[]) => any) | undefined;
116
118
  "onField-change"?: ((...args: any[]) => any) | undefined;
117
119
  }, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
@@ -126,7 +128,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
126
128
  }>;
127
129
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
128
130
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
129
- $emit: ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
131
+ $emit: ((event: "change", ...args: any[]) => void) & ((event: "error", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
130
132
  $el: any;
131
133
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
132
134
  config: {
@@ -190,6 +192,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
190
192
  };
191
193
  }>> & {
192
194
  onChange?: ((...args: any[]) => any) | undefined;
195
+ onError?: ((...args: any[]) => any) | undefined;
193
196
  "onField-input"?: ((...args: any[]) => any) | undefined;
194
197
  "onField-change"?: ((...args: any[]) => any) | undefined;
195
198
  }, {
@@ -202,6 +205,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
202
205
  submitForm: (native?: boolean | undefined) => Promise<any>;
203
206
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
204
207
  change: (...args: any[]) => void;
208
+ error: (...args: any[]) => void;
205
209
  "field-input": (...args: any[]) => void;
206
210
  "field-change": (...args: any[]) => void;
207
211
  }, string, {
@@ -299,6 +303,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
299
303
  };
300
304
  }>> & {
301
305
  onChange?: ((...args: any[]) => any) | undefined;
306
+ onError?: ((...args: any[]) => any) | undefined;
302
307
  "onField-input"?: ((...args: any[]) => any) | undefined;
303
308
  "onField-change"?: ((...args: any[]) => any) | undefined;
304
309
  } & import("vue").ShallowUnwrapRef<{
@@ -316,8 +321,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
316
321
  hide: () => void;
317
322
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
318
323
  change: (...args: any[]) => void;
319
- submit: (...args: any[]) => void;
320
324
  error: (...args: any[]) => void;
325
+ submit: (...args: any[]) => void;
321
326
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
322
327
  config?: FormConfig | undefined;
323
328
  values?: Object | undefined;
@@ -51,6 +51,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
51
51
  readonly size?: "large" | "default" | "small" | undefined;
52
52
  readonly extendState?: ((state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
53
53
  onChange?: ((...args: any[]) => any) | undefined;
54
+ onError?: ((...args: any[]) => any) | undefined;
54
55
  "onField-input"?: ((...args: any[]) => any) | undefined;
55
56
  "onField-change"?: ((...args: any[]) => any) | undefined;
56
57
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
@@ -115,6 +116,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
115
116
  };
116
117
  }>> & {
117
118
  onChange?: ((...args: any[]) => any) | undefined;
119
+ onError?: ((...args: any[]) => any) | undefined;
118
120
  "onField-input"?: ((...args: any[]) => any) | undefined;
119
121
  "onField-change"?: ((...args: any[]) => any) | undefined;
120
122
  }, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
@@ -129,7 +131,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
129
131
  }>;
130
132
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
131
133
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
132
- $emit: ((event: "change", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
134
+ $emit: ((event: "change", ...args: any[]) => void) & ((event: "error", ...args: any[]) => void) & ((event: "field-input", ...args: any[]) => void) & ((event: "field-change", ...args: any[]) => void);
133
135
  $el: any;
134
136
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
135
137
  config: {
@@ -193,6 +195,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
193
195
  };
194
196
  }>> & {
195
197
  onChange?: ((...args: any[]) => any) | undefined;
198
+ onError?: ((...args: any[]) => any) | undefined;
196
199
  "onField-input"?: ((...args: any[]) => any) | undefined;
197
200
  "onField-change"?: ((...args: any[]) => any) | undefined;
198
201
  }, {
@@ -205,6 +208,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
205
208
  submitForm: (native?: boolean | undefined) => Promise<any>;
206
209
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
207
210
  change: (...args: any[]) => void;
211
+ error: (...args: any[]) => void;
208
212
  "field-input": (...args: any[]) => void;
209
213
  "field-change": (...args: any[]) => void;
210
214
  }, string, {
@@ -302,6 +306,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
302
306
  };
303
307
  }>> & {
304
308
  onChange?: ((...args: any[]) => any) | undefined;
309
+ onError?: ((...args: any[]) => any) | undefined;
305
310
  "onField-input"?: ((...args: any[]) => any) | undefined;
306
311
  "onField-change"?: ((...args: any[]) => any) | undefined;
307
312
  } & import("vue").ShallowUnwrapRef<{
@@ -321,8 +326,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
321
326
  hide: () => void;
322
327
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
323
328
  change: (...args: any[]) => void;
324
- submit: (...args: any[]) => void;
325
329
  error: (...args: any[]) => void;
330
+ submit: (...args: any[]) => void;
326
331
  close: (...args: any[]) => void;
327
332
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
328
333
  config?: FormConfig | undefined;