@tmagic/form 1.6.1 → 1.7.0-beta.0

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 (42) hide show
  1. package/dist/style.css +23 -3
  2. package/dist/tmagic-form.js +1706 -1496
  3. package/dist/tmagic-form.umd.cjs +1739 -1525
  4. package/package.json +4 -4
  5. package/src/Form.vue +18 -5
  6. package/src/containers/Container.vue +109 -134
  7. package/src/containers/Fieldset.vue +31 -7
  8. package/src/containers/FlexLayout.vue +59 -0
  9. package/src/containers/Tabs.vue +11 -1
  10. package/src/fields/Cascader.vue +25 -16
  11. package/src/fields/Checkbox.vue +3 -3
  12. package/src/fields/CheckboxGroup.vue +1 -1
  13. package/src/fields/ColorPicker.vue +2 -2
  14. package/src/fields/Date.vue +2 -2
  15. package/src/fields/DateTime.vue +2 -2
  16. package/src/fields/Daterange.vue +2 -2
  17. package/src/fields/Number.vue +2 -2
  18. package/src/fields/NumberRange.vue +6 -6
  19. package/src/fields/RadioGroup.vue +7 -15
  20. package/src/fields/Select.vue +2 -2
  21. package/src/fields/Switch.vue +2 -2
  22. package/src/fields/Text.vue +20 -8
  23. package/src/fields/Textarea.vue +2 -2
  24. package/src/fields/Time.vue +2 -2
  25. package/src/fields/Timerange.vue +2 -2
  26. package/src/index.ts +5 -2
  27. package/src/table/ActionsColumn.vue +97 -0
  28. package/src/table/SortColumn.vue +101 -0
  29. package/src/table/Table.vue +170 -0
  30. package/src/table/type.ts +18 -0
  31. package/src/table/useAdd.ts +111 -0
  32. package/src/table/useFullscreen.ts +28 -0
  33. package/src/table/useImport.ts +68 -0
  34. package/src/table/usePagination.ts +30 -0
  35. package/src/table/useSelection.ts +34 -0
  36. package/src/table/useSortable.ts +48 -0
  37. package/src/table/useTableColumns.ts +194 -0
  38. package/src/theme/container.scss +17 -0
  39. package/src/theme/form.scss +15 -3
  40. package/src/utils/form.ts +56 -2
  41. package/types/index.d.ts +52 -36
  42. package/src/containers/Table.vue +0 -681
@@ -0,0 +1,194 @@
1
+ import { computed, h, inject, type Ref } from 'vue';
2
+ import { cloneDeep } from 'lodash-es';
3
+
4
+ import type { TableColumnOptions } from '@tmagic/design';
5
+ import type { FormState, TableColumnConfig } from '@tmagic/form-schema';
6
+
7
+ import Container from '../containers/Container.vue';
8
+ import type { ContainerChangeEventData } from '../schema';
9
+ import { display as displayFunc, getDataByPage, sortArray } from '../utils/form';
10
+
11
+ import ActionsColumn from './ActionsColumn.vue';
12
+ import SortColumn from './SortColumn.vue';
13
+ import type { TableProps } from './type';
14
+
15
+ export const useTableColumns = (
16
+ props: TableProps,
17
+ emit: (event: 'select' | 'change' | 'addDiffCount', ...args: any[]) => void,
18
+ currentPage: Ref<number>,
19
+ pageSize: Ref<number>,
20
+ modelName: Ref<string | number>,
21
+ ) => {
22
+ const mForm = inject<FormState | undefined>('mForm');
23
+
24
+ const display = (fuc: any) => displayFunc(mForm, fuc, props);
25
+
26
+ const lastData = computed(() =>
27
+ props.config.pagination
28
+ ? getDataByPage(props.lastValues[modelName.value], currentPage.value, pageSize.value)
29
+ : props.lastValues[modelName.value] || [],
30
+ );
31
+
32
+ const itemExtra = (fuc: any, index: number) => {
33
+ if (typeof fuc === 'function') {
34
+ return fuc(mForm, {
35
+ values: mForm?.initValues,
36
+ model: props.model,
37
+ formValue: mForm ? mForm.values : props.model,
38
+ prop: props.prop,
39
+ index,
40
+ });
41
+ }
42
+
43
+ return fuc;
44
+ };
45
+
46
+ const selection = computed(() => {
47
+ if (typeof props.config.selection === 'function') {
48
+ return props.config.selection(mForm, { model: props.model[modelName.value] });
49
+ }
50
+ return props.config.selection;
51
+ });
52
+
53
+ const getProp = (index: number) => {
54
+ return `${props.prop}${props.prop ? '.' : ''}${index + 1 + currentPage.value * pageSize.value - 1}`;
55
+ };
56
+
57
+ const makeConfig = (config: TableColumnConfig, row: any) => {
58
+ const newConfig = cloneDeep(config);
59
+ if (typeof config.itemsFunction === 'function') {
60
+ newConfig.items = config.itemsFunction(row);
61
+ }
62
+ delete newConfig.display;
63
+ return newConfig;
64
+ };
65
+
66
+ const changeHandler = (v: any, eventData: ContainerChangeEventData) => {
67
+ emit('change', props.model, eventData);
68
+ };
69
+
70
+ const onAddDiffCount = () => emit('addDiffCount');
71
+
72
+ const columns = computed<TableColumnOptions[]>(() => {
73
+ const columns: TableColumnOptions[] = [];
74
+
75
+ if (props.config.itemExtra && !props.config.dropSort) {
76
+ columns.push({
77
+ props: {
78
+ fixed: 'left',
79
+ width: 30,
80
+ type: 'expand',
81
+ },
82
+ cell: ({ $index }: any) =>
83
+ h('span', {
84
+ innerHTML: itemExtra(props.config.itemExtra, $index),
85
+ class: 'm-form-tip',
86
+ }),
87
+ });
88
+ }
89
+
90
+ columns.push({
91
+ props: {
92
+ label: '操作',
93
+ fixed: props.config.fixed === false ? undefined : 'left',
94
+ width: props.config.operateColWidth || 112,
95
+ align: 'center',
96
+ },
97
+ cell: ({ row, $index }: any) =>
98
+ h(ActionsColumn, {
99
+ row,
100
+ index: $index,
101
+ model: props.model,
102
+ config: props.config,
103
+ prop: props.prop,
104
+ disabled: props.disabled,
105
+ sortKey: props.sortKey,
106
+ name: modelName.value,
107
+ currentPage: currentPage.value,
108
+ pageSize: pageSize.value,
109
+ onChange: (v: any) => {
110
+ emit('change', v);
111
+ },
112
+ }),
113
+ });
114
+
115
+ if (props.sort && props.model[modelName.value] && props.model[modelName.value].length > 1) {
116
+ columns.push({
117
+ props: {
118
+ label: '排序',
119
+ width: 80,
120
+ },
121
+ cell: ({ $index }: any) =>
122
+ h(SortColumn, {
123
+ index: $index,
124
+ model: props.model,
125
+ disabled: props.disabled,
126
+ name: modelName.value,
127
+ currentPage: currentPage.value,
128
+ pageSize: pageSize.value,
129
+ onSwap: (index1: number, index2: number) => {
130
+ const newData = sortArray(props.model[modelName.value], index1, index2, props.sortKey);
131
+ emit('change', newData);
132
+ mForm?.$emit('field-change', newData);
133
+ },
134
+ }),
135
+ });
136
+ }
137
+
138
+ if (selection.value) {
139
+ columns.push({
140
+ props: {
141
+ align: 'center',
142
+ headerAlign: 'center',
143
+ type: 'selection',
144
+ width: 45,
145
+ },
146
+ });
147
+ }
148
+
149
+ if (props.showIndex && props.config.showIndex) {
150
+ columns.push({
151
+ props: {
152
+ label: '序号',
153
+ width: 60,
154
+ },
155
+ cell: ({ $index }: any) => h('span', $index + 1 + currentPage.value * pageSize.value),
156
+ });
157
+ }
158
+
159
+ for (const column of props.config.items) {
160
+ if (column.type !== 'hidden' && display(column.display)) {
161
+ columns.push({
162
+ props: {
163
+ prop: column.name,
164
+ label: column.label,
165
+ width: column.width,
166
+ sortable: column.sortable,
167
+ sortOrders: ['ascending', 'descending'],
168
+ class: props.config.dropSort === true ? 'el-table__column--dropable' : '',
169
+ },
170
+ cell: ({ row, $index }: any) =>
171
+ h(Container, {
172
+ labelWidth: '0',
173
+ disabled: props.disabled,
174
+ prop: getProp($index),
175
+ rules: column.rules,
176
+ config: makeConfig(column, row),
177
+ model: row,
178
+ lastValues: lastData.value[$index],
179
+ isCompare: props.isCompare,
180
+ size: props.size,
181
+ onChange: changeHandler,
182
+ onAddDiffCount,
183
+ }),
184
+ });
185
+ }
186
+ }
187
+
188
+ return columns;
189
+ });
190
+
191
+ return {
192
+ columns,
193
+ };
194
+ };
@@ -3,3 +3,20 @@
3
3
  display: inline-flex;
4
4
  }
5
5
  }
6
+
7
+ .m-form-container {
8
+ &.has-tip {
9
+ display: flex;
10
+ align-items: baseline;
11
+
12
+ .tmagic-design-form-item {
13
+ flex: 1;
14
+ }
15
+ }
16
+
17
+ .tmagic-design-form-item {
18
+ &.show-diff {
19
+ background: #f7dadd;
20
+ }
21
+ }
22
+ }
@@ -19,17 +19,21 @@
19
19
  height: 100%;
20
20
  }
21
21
 
22
- .el-table {
22
+ .tmagic-design-table {
23
23
  .cell > div.m-form-container {
24
24
  display: block;
25
+
26
+ &.has-tip {
27
+ display: flex;
28
+ }
25
29
  }
26
30
  }
27
31
 
28
- .el-tabs {
32
+ .tmagic-design-tabs {
29
33
  margin-bottom: 10px;
30
34
  }
31
35
 
32
- .el-form-item.tmagic-form-hidden {
36
+ .tmagic-design-form-item.tmagic-form-hidden {
33
37
  > .el-form-item__label {
34
38
  display: none;
35
39
  }
@@ -39,5 +43,13 @@
39
43
  > .t-form__label {
40
44
  display: none;
41
45
  }
46
+
47
+ > .t-form__controls {
48
+ margin-left: 0 !important;
49
+ }
50
+ }
51
+
52
+ &.t-form:not(.t-form-inline) .t-form__item:last-of-type {
53
+ margin-bottom: var(--td-comp-margin-xxl);
42
54
  }
43
55
  }
package/src/utils/form.ts CHANGED
@@ -21,6 +21,8 @@ import dayjs from 'dayjs';
21
21
  import utc from 'dayjs/plugin/utc';
22
22
  import { cloneDeep } from 'lodash-es';
23
23
 
24
+ import { getValueByKeyPath } from '@tmagic/utils';
25
+
24
26
  import {
25
27
  ChildConfig,
26
28
  ContainerCommonConfig,
@@ -31,6 +33,7 @@ import {
31
33
  FormValue,
32
34
  HtmlField,
33
35
  Rule,
36
+ SortProp,
34
37
  TabPaneConfig,
35
38
  TypeFunction,
36
39
  } from '../schema';
@@ -89,8 +92,13 @@ const setValue = (mForm: FormState | undefined, value: FormValue, initValue: For
89
92
 
90
93
  // 如果fieldset配置checkbox,checkbox的值保存在value中
91
94
  if (type === 'fieldset' && checkbox) {
92
- if (typeof value[name] === 'object') {
93
- value[name].value = typeof initValue[name] === 'object' ? initValue[name].value || 0 : 0;
95
+ const checkboxName = typeof checkbox === 'object' && typeof checkbox.name === 'string' ? checkbox.name : 'value';
96
+ const checkboxFalseValue =
97
+ typeof checkbox === 'object' && typeof checkbox.falseValue !== 'undefined' ? checkbox.falseValue : 0;
98
+
99
+ if (name && typeof value[name] === 'object') {
100
+ value[name][checkboxName] =
101
+ typeof initValue[name] === 'object' ? initValue[name][checkboxName] || checkboxFalseValue : checkboxFalseValue;
94
102
  }
95
103
  }
96
104
  };
@@ -136,6 +144,18 @@ const initValueItem = function (
136
144
 
137
145
  setValue(mForm, value, initValue, item);
138
146
 
147
+ if (type === 'table') {
148
+ if (item.defautSort) {
149
+ sortChange(value[name], item.defautSort);
150
+ } else if (item.defaultSort) {
151
+ sortChange(value[name], item.defaultSort);
152
+ }
153
+
154
+ if (item.sort && item.sortKey) {
155
+ value[name].sort((a: any, b: any) => b[item.sortKey] - a[item.sortKey]);
156
+ }
157
+ }
158
+
139
159
  return value;
140
160
  };
141
161
 
@@ -197,6 +217,7 @@ export const filterFunction = <T = any>(
197
217
  prop: props.prop,
198
218
  config: props.config,
199
219
  index: props.index,
220
+ getFormValue: (prop: string) => getValueByKeyPath(prop, mForm?.values || props.model),
200
221
  });
201
222
  }
202
223
 
@@ -297,3 +318,36 @@ export const datetimeFormatter = (
297
318
  }
298
319
  return defaultValue;
299
320
  };
321
+
322
+ export const getDataByPage = (data: any[] = [], pagecontext: number, pagesize: number) =>
323
+ data.filter(
324
+ (item: any, index: number) => index >= pagecontext * pagesize && index + 1 <= (pagecontext + 1) * pagesize,
325
+ );
326
+
327
+ export const sortArray = (data: any[], newIndex: number, oldIndex: number, sortKey?: string) => {
328
+ if (newIndex === oldIndex) {
329
+ return data;
330
+ }
331
+
332
+ if (newIndex < 0 || newIndex >= data.length || oldIndex < 0 || oldIndex >= data.length) {
333
+ return data;
334
+ }
335
+
336
+ const newData = data.toSpliced(newIndex, 0, ...data.splice(oldIndex, 1));
337
+
338
+ if (sortKey) {
339
+ for (let i = newData.length - 1, v = 0; i >= 0; i--, v++) {
340
+ newData[v][sortKey] = i;
341
+ }
342
+ }
343
+
344
+ return newData;
345
+ };
346
+
347
+ export const sortChange = (data: any[], { prop, order }: SortProp) => {
348
+ if (order === 'ascending') {
349
+ data = data.sort((a: any, b: any) => a[prop] - b[prop]);
350
+ } else if (order === 'descending') {
351
+ data = data.sort((a: any, b: any) => b[prop] - a[prop]);
352
+ }
353
+ };
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { App } from 'vue';
2
2
  import * as _tmagic_form_schema from '@tmagic/form-schema';
3
- import { FormState, FormConfig, TabPaneConfig, FormValue, FilterFunction, Rule, ChildConfig, FieldsetConfig, PanelConfig, RowConfig, TabConfig, TableConfig, GroupListConfig, FieldProps, TextConfig, NumberConfig, NumberRangeConfig, TextareaConfig, HiddenConfig, DateConfig, DateTimeConfig, TimeConfig, CheckboxConfig, SwitchConfig, DaterangeConfig, ColorPickConfig, CheckboxGroupConfig, RadioGroupConfig, DisplayConfig, LinkConfig, SelectConfig, SelectOption, SelectGroupOption, CascaderConfig, DynamicFieldConfig } from '@tmagic/form-schema';
3
+ import { FormState, FormConfig, TabPaneConfig, FormValue, FilterFunction, Rule, SortProp, ChildConfig, FieldsetConfig, FlexLayoutConfig, PanelConfig, RowConfig, TabConfig, TableConfig, GroupListConfig, FieldProps, TextConfig, NumberConfig, NumberRangeConfig, TextareaConfig, HiddenConfig, DateConfig, DateTimeConfig, TimeConfig, CheckboxConfig, SwitchConfig, DaterangeConfig, ColorPickConfig, CheckboxGroupConfig, RadioGroupConfig, DisplayConfig, LinkConfig, SelectConfig, SelectOption, SelectGroupOption, CascaderConfig, DynamicFieldConfig } from '@tmagic/form-schema';
4
4
  export * from '@tmagic/form-schema';
5
5
  import * as _vue_runtime_core from '@vue/runtime-core';
6
6
  import * as _vue_reactivity from '@vue/reactivity';
@@ -28,6 +28,9 @@ declare const initValue: (mForm: FormState | undefined, { initValues, config }:
28
28
  config: FormConfig;
29
29
  }) => Promise<FormValue>;
30
30
  declare const datetimeFormatter: (v: string | Date, defaultValue?: string, format?: string) => string | number;
31
+ declare const getDataByPage: (data: any[] | undefined, pagecontext: number, pagesize: number) => any[];
32
+ declare const sortArray: (data: any[], newIndex: number, oldIndex: number, sortKey?: string) => any[];
33
+ declare const sortChange: (data: any[], { prop, order }: SortProp) => void;
31
34
 
32
35
  declare const useAddField: (prop?: string) => void;
33
36
 
@@ -53,7 +56,7 @@ type __VLS_Props$u = {
53
56
  preventSubmitDefault?: boolean;
54
57
  extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
55
58
  };
56
- declare const __VLS_export$u: _vue_runtime_core.DefineComponent<__VLS_Props$u, {
59
+ declare const __VLS_export$v: _vue_runtime_core.DefineComponent<__VLS_Props$u, {
57
60
  values: _vue_reactivity.Ref<FormValue, FormValue>;
58
61
  lastValuesProcessed: _vue_reactivity.Ref<FormValue, FormValue>;
59
62
  formState: FormState;
@@ -88,7 +91,7 @@ declare const __VLS_export$u: _vue_runtime_core.DefineComponent<__VLS_Props$u, {
88
91
  parentValues: Record<string, any>;
89
92
  stepActive: string | number;
90
93
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
91
- declare const _default$v: typeof __VLS_export$u;
94
+ declare const _default$w: typeof __VLS_export$v;
92
95
 
93
96
  type __VLS_Props$t = {
94
97
  config?: FormConfig;
@@ -345,8 +348,8 @@ declare const __VLS_base$4: _vue_runtime_core.DefineComponent<__VLS_Props$t, {
345
348
  config: FormConfig;
346
349
  confirmText: string;
347
350
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
348
- declare const __VLS_export$t: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
349
- declare const _default$u: typeof __VLS_export$t;
351
+ declare const __VLS_export$u: __VLS_WithSlots$4<typeof __VLS_base$4, __VLS_Slots$4>;
352
+ declare const _default$v: typeof __VLS_export$u;
350
353
 
351
354
  type __VLS_WithSlots$4<T, S> = T & {
352
355
  new (): {
@@ -617,8 +620,8 @@ declare const __VLS_base$3: _vue_runtime_core.DefineComponent<__VLS_Props$s, {
617
620
  config: FormConfig;
618
621
  confirmText: string;
619
622
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
620
- declare const __VLS_export$s: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
621
- declare const _default$t: typeof __VLS_export$s;
623
+ declare const __VLS_export$t: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
624
+ declare const _default$u: typeof __VLS_export$t;
622
625
 
623
626
  type __VLS_WithSlots$3<T, S> = T & {
624
627
  new (): {
@@ -874,8 +877,8 @@ declare const __VLS_base$2: _vue_runtime_core.DefineComponent<__VLS_Props$r, {
874
877
  config: FormConfig;
875
878
  confirmText: string;
876
879
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
877
- declare const __VLS_export$r: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
878
- declare const _default$s: typeof __VLS_export$r;
880
+ declare const __VLS_export$s: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
881
+ declare const _default$t: typeof __VLS_export$s;
879
882
 
880
883
  type __VLS_WithSlots$2<T, S> = T & {
881
884
  new (): {
@@ -898,7 +901,7 @@ type __VLS_Props$q = {
898
901
  /** 是否开启对比模式 */
899
902
  isCompare?: boolean;
900
903
  };
901
- declare const __VLS_export$q: _vue_runtime_core.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
904
+ declare const __VLS_export$r: _vue_runtime_core.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
902
905
  change: (v: any, eventData: ContainerChangeEventData) => any;
903
906
  addDiffCount: () => any;
904
907
  }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$q> & Readonly<{
@@ -911,7 +914,7 @@ declare const __VLS_export$q: _vue_runtime_core.DefineComponent<__VLS_Props$q, {
911
914
  isCompare: boolean;
912
915
  expandMore: boolean;
913
916
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
914
- declare const _default$r: typeof __VLS_export$q;
917
+ declare const _default$s: typeof __VLS_export$r;
915
918
 
916
919
  type __VLS_Props$p = {
917
920
  labelWidth?: string;
@@ -924,7 +927,7 @@ type __VLS_Props$p = {
924
927
  rules?: any;
925
928
  disabled?: boolean;
926
929
  };
927
- declare const __VLS_export$p: _vue_runtime_core.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
930
+ declare const __VLS_export$q: _vue_runtime_core.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
928
931
  change: (v: any, eventData: ContainerChangeEventData) => any;
929
932
  addDiffCount: () => any;
930
933
  }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$p> & Readonly<{
@@ -936,9 +939,29 @@ declare const __VLS_export$p: _vue_runtime_core.DefineComponent<__VLS_Props$p, {
936
939
  lastValues: Record<string, any>;
937
940
  isCompare: boolean;
938
941
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
939
- declare const _default$q: typeof __VLS_export$p;
942
+ declare const _default$r: typeof __VLS_export$q;
940
943
 
941
944
  type __VLS_Props$o = {
945
+ model: any;
946
+ lastValues?: any;
947
+ isCompare?: boolean;
948
+ config: FlexLayoutConfig;
949
+ name?: string;
950
+ labelWidth?: string;
951
+ prop?: string;
952
+ size?: string;
953
+ disabled?: boolean;
954
+ };
955
+ declare const __VLS_export$p: _vue_runtime_core.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
956
+ change: (v: any, eventData: ContainerChangeEventData) => any;
957
+ addDiffCount: () => any;
958
+ }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
959
+ onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
960
+ onAddDiffCount?: (() => any) | undefined;
961
+ }>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
962
+ declare const _default$q: typeof __VLS_export$p;
963
+
964
+ type __VLS_Props$n = {
942
965
  model: any;
943
966
  lastValues?: any;
944
967
  isCompare?: boolean;
@@ -956,10 +979,10 @@ type __VLS_Slots$1 = {} & {
956
979
  } & {
957
980
  default?: (props: typeof __VLS_18) => any;
958
981
  };
959
- declare const __VLS_base$1: _vue_runtime_core.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
982
+ declare const __VLS_base$1: _vue_runtime_core.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
960
983
  change: (v: any, eventData: ContainerChangeEventData) => any;
961
984
  addDiffCount: () => any;
962
- }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
985
+ }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
963
986
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
964
987
  onAddDiffCount?: (() => any) | undefined;
965
988
  }>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
@@ -972,7 +995,7 @@ type __VLS_WithSlots$1<T, S> = T & {
972
995
  };
973
996
  };
974
997
 
975
- type __VLS_Props$n = {
998
+ type __VLS_Props$m = {
976
999
  model: any;
977
1000
  lastValues?: any;
978
1001
  isCompare?: boolean;
@@ -984,16 +1007,16 @@ type __VLS_Props$n = {
984
1007
  expandMore?: boolean;
985
1008
  disabled?: boolean;
986
1009
  };
987
- declare const __VLS_export$n: _vue_runtime_core.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
1010
+ declare const __VLS_export$n: _vue_runtime_core.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
988
1011
  change: (v: any, eventData: ContainerChangeEventData) => any;
989
1012
  addDiffCount: () => any;
990
- }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$n> & Readonly<{
1013
+ }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
991
1014
  onChange?: ((v: any, eventData: ContainerChangeEventData) => any) | undefined;
992
1015
  onAddDiffCount?: (() => any) | undefined;
993
1016
  }>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
994
1017
  declare const _default$o: typeof __VLS_export$n;
995
1018
 
996
- type __VLS_Props$m = {
1019
+ type __VLS_Props$l = {
997
1020
  model: any;
998
1021
  lastValues?: any;
999
1022
  isCompare?: boolean;
@@ -1005,10 +1028,10 @@ type __VLS_Props$m = {
1005
1028
  expandMore?: boolean;
1006
1029
  disabled?: boolean;
1007
1030
  };
1008
- declare const __VLS_export$m: _vue_runtime_core.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
1031
+ declare const __VLS_export$m: _vue_runtime_core.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
1009
1032
  change: (v: any, eventData?: ContainerChangeEventData | undefined) => any;
1010
1033
  addDiffCount: () => any;
1011
- }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$m> & Readonly<{
1034
+ }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
1012
1035
  onChange?: ((v: any, eventData?: ContainerChangeEventData | undefined) => any) | undefined;
1013
1036
  onAddDiffCount?: (() => any) | undefined;
1014
1037
  }>, {
@@ -1017,7 +1040,7 @@ declare const __VLS_export$m: _vue_runtime_core.DefineComponent<__VLS_Props$m, {
1017
1040
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
1018
1041
  declare const _default$n: typeof __VLS_export$m;
1019
1042
 
1020
- type __VLS_Props$l = {
1043
+ interface TableProps {
1021
1044
  model: any;
1022
1045
  lastValues?: any;
1023
1046
  isCompare?: boolean;
@@ -1032,26 +1055,19 @@ type __VLS_Props$l = {
1032
1055
  size?: string;
1033
1056
  enableToggleMode?: boolean;
1034
1057
  showIndex?: boolean;
1035
- };
1036
- declare var __VLS_34: {
1037
- scope: {
1038
- $index: any;
1039
- row: any;
1040
- };
1041
- };
1042
- declare var __VLS_111: {};
1058
+ }
1059
+
1060
+ declare var __VLS_22: {};
1043
1061
  type __VLS_Slots = {} & {
1044
- operateCol?: (props: typeof __VLS_34) => any;
1045
- } & {
1046
- default?: (props: typeof __VLS_111) => any;
1062
+ default?: (props: typeof __VLS_22) => any;
1047
1063
  };
1048
- declare const __VLS_base: _vue_runtime_core.DefineComponent<__VLS_Props$l, {
1064
+ declare const __VLS_base: _vue_runtime_core.DefineComponent<TableProps, {
1049
1065
  toggleRowSelection: (row: any, selected: boolean) => void;
1050
1066
  }, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
1051
1067
  change: (...args: any[]) => void;
1052
1068
  select: (...args: any[]) => void;
1053
1069
  addDiffCount: (...args: any[]) => void;
1054
- }, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
1070
+ }, string, _vue_runtime_core.PublicProps, Readonly<TableProps> & Readonly<{
1055
1071
  onChange?: ((...args: any[]) => any) | undefined;
1056
1072
  onSelect?: ((...args: any[]) => any) | undefined;
1057
1073
  onAddDiffCount?: ((...args: any[]) => any) | undefined;
@@ -1287,5 +1303,5 @@ declare const _default: {
1287
1303
  install(app: App, opt?: FormInstallOptions): void;
1288
1304
  };
1289
1305
 
1290
- export { _default$2 as MCascader, _default$c as MCheckbox, _default$7 as MCheckboxGroup, _default$8 as MColorPicker, _default$r as MContainer, _default$f as MDate, _default$e as MDateTime, _default$a as MDaterange, _default$5 as MDisplay, _default$1 as MDynamicField, _default$q as MFieldset, _default$v as MForm, _default$s as MFormBox, _default$u as MFormDialog, _default$t as MFormDrawer, _default$l as MGroupList, _default$g as MHidden, _default$4 as MLink, _default$j as MNumber, _default$i as MNumberRange, _default$p as MPanel, _default$6 as MRadioGroup, _default$o as MRow, _default$3 as MSelect, _default$b as MSwitch, _default$m as MTable, _default$n as MTabs, _default$k as MText, _default$h as MTextarea, _default$d as MTime, _default$9 as MTimerange, createForm, createValues, datetimeFormatter, _default as default, display, filterFunction, getRules, initValue, useAddField };
1306
+ export { _default$2 as MCascader, _default$c as MCheckbox, _default$7 as MCheckboxGroup, _default$8 as MColorPicker, _default$s as MContainer, _default$f as MDate, _default$e as MDateTime, _default$a as MDaterange, _default$5 as MDisplay, _default$1 as MDynamicField, _default$r as MFieldset, _default$q as MFlexLayout, _default$w as MForm, _default$t as MFormBox, _default$v as MFormDialog, _default$u as MFormDrawer, _default$l as MGroupList, _default$g as MHidden, _default$4 as MLink, _default$j as MNumber, _default$i as MNumberRange, _default$p as MPanel, _default$6 as MRadioGroup, _default$o as MRow, _default$3 as MSelect, _default$b as MSwitch, _default$m as MTable, _default$n as MTabs, _default$k as MText, _default$h as MTextarea, _default$d as MTime, _default$9 as MTimerange, createForm, createValues, datetimeFormatter, _default as default, display, filterFunction, getDataByPage, getRules, initValue, sortArray, sortChange, useAddField };
1291
1307
  export type { ChangeRecord, ContainerChangeEventData, FormInstallOptions, ValidateError };