@tmagic/form 1.2.6 → 1.2.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.
@@ -9,6 +9,7 @@
9
9
  style="width: 100%"
10
10
  :row-key="config.rowKey || 'id'"
11
11
  :data="data"
12
+ :lastData="lastData"
12
13
  :border="config.border"
13
14
  :max-height="config.maxHeight"
14
15
  :default-expand-all="true"
@@ -108,8 +109,11 @@
108
109
  :rules="column.rules"
109
110
  :config="makeConfig(column, scope.row)"
110
111
  :model="scope.row"
112
+ :lastValues="lastData[scope.$index]"
113
+ :is-compare="isCompare"
111
114
  :size="size"
112
115
  @change="$emit('change', model[modelName])"
116
+ @addDiffCount="onAddDiffCount()"
113
117
  ></Container>
114
118
  </template>
115
119
  </TMagicTableColumn>
@@ -196,6 +200,8 @@ import Container from './Container.vue';
196
200
  const props = withDefaults(
197
201
  defineProps<{
198
202
  model: any;
203
+ lastValues?: any;
204
+ isCompare?: boolean;
199
205
  config: TableConfig;
200
206
  name: string;
201
207
  prop?: string;
@@ -213,10 +219,12 @@ const props = withDefaults(
213
219
  sortKey: '',
214
220
  enableToggleMode: true,
215
221
  showIndex: true,
222
+ lastValues: () => ({}),
223
+ isCompare: false,
216
224
  },
217
225
  );
218
226
 
219
- const emit = defineEmits(['change', 'select']);
227
+ const emit = defineEmits(['change', 'select', 'addDiffCount']);
220
228
 
221
229
  let timer: any | null = null;
222
230
  const mForm = inject<FormState | undefined>('mForm');
@@ -241,6 +249,15 @@ const data = computed(() =>
241
249
  : props.model[modelName.value],
242
250
  );
243
251
 
252
+ const lastData = computed(() =>
253
+ props.config.pagination
254
+ ? props.lastValues[modelName.value].filter(
255
+ (item: any, index: number) =>
256
+ index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value,
257
+ )
258
+ : props.lastValues[modelName.value] || {},
259
+ );
260
+
244
261
  const sortChange = ({ prop, order }: SortProp) => {
245
262
  if (order === 'ascending') {
246
263
  props.model[modelName.value] = props.model[modelName.value].sort((a: any, b: any) => a[prop] - b[prop]);
@@ -593,6 +610,8 @@ const getProp = (index: number) => {
593
610
  return `${prop.value}${prop.value ? '.' : ''}${index + 1 + pagecontext.value * pagesize.value - 1}`;
594
611
  };
595
612
 
613
+ const onAddDiffCount = () => emit('addDiffCount');
614
+
596
615
  defineExpose({
597
616
  toggleRowSelection,
598
617
  });
@@ -18,25 +18,26 @@
18
18
  :label="filter(tab.title)"
19
19
  :lazy="tab.lazy || false"
20
20
  >
21
+ <template #label>
22
+ <span class="custom-tabs-label">
23
+ {{ filter(tab.title)
24
+ }}<el-badge :hidden="!diffCount[tabIndex]" :value="diffCount[tabIndex]" class="diff-count-badge"></el-badge>
25
+ </span>
26
+ </template>
21
27
  <Container
22
28
  v-for="item in tabItems(tab)"
23
29
  :key="item[mForm?.keyProp || '__key']"
24
30
  :config="item"
25
31
  :disabled="disabled"
26
- :model="
27
- config.dynamic
28
- ? (name ? model[name] : model)[tabIndex]
29
- : tab.name
30
- ? (name ? model[name] : model)[tab.name]
31
- : name
32
- ? model[name]
33
- : model
34
- "
32
+ :model="getValues(model, tabIndex, tab)"
33
+ :last-values="getValues(lastValues, tabIndex, tab)"
34
+ :is-compare="isCompare"
35
35
  :prop="config.dynamic ? `${prop}${prop ? '.' : ''}${String(tabIndex)}` : prop"
36
36
  :size="size"
37
37
  :label-width="tab.labelWidth || labelWidth"
38
38
  :expand-more="expandMore"
39
39
  @change="changeHandler"
40
+ @addDiffCount="onAddDiffCount(tabIndex)"
40
41
  ></Container>
41
42
  </component>
42
43
  </template>
@@ -54,6 +55,10 @@ import { display as displayFunc, filterFunction } from '../utils/form';
54
55
 
55
56
  import Container from './Container.vue';
56
57
 
58
+ type DiffCount = {
59
+ [tabIndex: number]: number;
60
+ };
61
+
57
62
  const uiComponent = getConfig('components').tabPane;
58
63
 
59
64
  const getActive = (mForm: FormState | undefined, props: any, activeTabName: string) => {
@@ -83,21 +88,30 @@ const tabClick = (mForm: FormState | undefined, tab: any, props: any) => {
83
88
  }
84
89
  };
85
90
 
86
- const props = defineProps<{
87
- model: any;
88
- config: TabConfig;
89
- name: string;
90
- size?: string;
91
- labelWidth?: string;
92
- prop?: string;
93
- expandMore?: boolean;
94
- disabled?: boolean;
95
- }>();
96
-
97
- const emit = defineEmits(['change']);
91
+ const props = withDefaults(
92
+ defineProps<{
93
+ model: any;
94
+ lastValues?: any;
95
+ isCompare?: boolean;
96
+ config: TabConfig;
97
+ name: string;
98
+ size?: string;
99
+ labelWidth?: string;
100
+ prop?: string;
101
+ expandMore?: boolean;
102
+ disabled?: boolean;
103
+ }>(),
104
+ {
105
+ lastValues: () => ({}),
106
+ isCompare: false,
107
+ },
108
+ );
109
+
110
+ const emit = defineEmits(['change', 'addDiffCount']);
98
111
 
99
112
  const mForm = inject<FormState | undefined>('mForm');
100
113
  const activeTabName = ref(getActive(mForm, props, ''));
114
+ const diffCount = ref<DiffCount>({});
101
115
 
102
116
  const tabs = computed(() => {
103
117
  if (props.config.dynamic) {
@@ -170,4 +184,27 @@ const changeHandler = () => {
170
184
  props.config.onChange(mForm, { model: props.model, prop: props.prop, config: props.config });
171
185
  }
172
186
  };
187
+
188
+ const getValues = (model: any, tabIndex: number, tab: any) => {
189
+ const tabName = props.config.dynamic ? (model[props?.name] || model)[tabIndex] : tab.name;
190
+ let propName = props.name;
191
+ if (tabName) {
192
+ propName = (model[props?.name] || model)[tab.name];
193
+ }
194
+ if (propName) {
195
+ return model[props.name];
196
+ }
197
+ return model;
198
+ };
199
+
200
+ // 在tabs组件中收集事件触发次数,即该tab下的差异数
201
+ const onAddDiffCount = (tabIndex: number) => {
202
+ if (!diffCount.value[tabIndex]) {
203
+ diffCount.value[tabIndex] = 1;
204
+ } else {
205
+ diffCount.value[tabIndex] += 1;
206
+ }
207
+ // 继续抛出给更高层级的组件
208
+ emit('addDiffCount');
209
+ };
173
210
  </script>
package/src/schema.ts CHANGED
@@ -28,6 +28,8 @@ export type FormState = {
28
28
  config: FormConfig;
29
29
  popperClass?: string;
30
30
  initValues: FormValue;
31
+ lastValues: FormValue;
32
+ isCompare: boolean;
31
33
  values: FormValue;
32
34
  $emit: (event: string, ...args: any[]) => void;
33
35
  keyProp?: string;
@@ -7,3 +7,4 @@
7
7
  @use "./panel.scss";
8
8
  @use "./table.scss";
9
9
  @use "./select.scss";
10
+ @use "./tabs.scss";
@@ -23,3 +23,7 @@
23
23
  .magic-form-tab {
24
24
  margin-bottom: 10px;
25
25
  }
26
+
27
+ .diff-count-badge {
28
+ top: -10px;
29
+ }
@@ -1,7 +1,13 @@
1
1
  import type { FormConfig, FormState, FormValue } from './schema';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ /** 表单配置 */
3
4
  config: FormConfig;
5
+ /** 表单值 */
4
6
  initValues: Object;
7
+ /** 需对比的值(开启对比模式时传入) */
8
+ lastValues?: Object | undefined;
9
+ /** 是否开启对比模式 */
10
+ isCompare?: boolean | undefined;
5
11
  parentValues?: Object | undefined;
6
12
  labelWidth?: string | undefined;
7
13
  disabled?: boolean | undefined;
@@ -15,6 +21,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
15
21
  }>, {
16
22
  config: () => never[];
17
23
  initValues: () => {};
24
+ lastValues: () => {};
25
+ isCompare: boolean;
18
26
  parentValues: () => {};
19
27
  labelWidth: string;
20
28
  disabled: boolean;
@@ -25,14 +33,21 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
25
33
  keyProp: string;
26
34
  }>, {
27
35
  values: import("vue").Ref<FormValue>;
36
+ lastValuesProcessed: import("vue").Ref<FormValue>;
28
37
  formState: FormState;
29
38
  initialized: import("vue").Ref<boolean>;
30
39
  changeHandler: () => void;
31
40
  resetForm: () => any;
32
41
  submitForm: (native?: boolean) => Promise<any>;
33
42
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], "change" | "field-input" | "field-change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
43
+ /** 表单配置 */
34
44
  config: FormConfig;
45
+ /** 表单值 */
35
46
  initValues: Object;
47
+ /** 需对比的值(开启对比模式时传入) */
48
+ lastValues?: Object | undefined;
49
+ /** 是否开启对比模式 */
50
+ isCompare?: boolean | undefined;
36
51
  parentValues?: Object | undefined;
37
52
  labelWidth?: string | undefined;
38
53
  disabled?: boolean | undefined;
@@ -46,6 +61,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
46
61
  }>, {
47
62
  config: () => never[];
48
63
  initValues: () => {};
64
+ lastValues: () => {};
65
+ isCompare: boolean;
49
66
  parentValues: () => {};
50
67
  labelWidth: string;
51
68
  disabled: boolean;
@@ -61,6 +78,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
61
78
  }, {
62
79
  config: FormConfig;
63
80
  initValues: Object;
81
+ lastValues: Object;
82
+ isCompare: boolean;
64
83
  keyProp: string;
65
84
  parentValues: Object;
66
85
  labelWidth: string;
@@ -70,6 +70,8 @@ declare const _default: {
70
70
  $props: Partial<{
71
71
  config: FormConfig;
72
72
  initValues: Object;
73
+ lastValues: Object;
74
+ isCompare: boolean;
73
75
  keyProp: string;
74
76
  parentValues: Object;
75
77
  labelWidth: string;
@@ -94,6 +96,16 @@ declare const _default: {
94
96
  } & {
95
97
  default: () => {};
96
98
  };
99
+ lastValues: {
100
+ type: import("vue").PropType<Object>;
101
+ } & {
102
+ default: () => {};
103
+ };
104
+ isCompare: {
105
+ type: import("vue").PropType<boolean>;
106
+ } & {
107
+ default: boolean;
108
+ };
97
109
  keyProp: {
98
110
  type: import("vue").PropType<string>;
99
111
  } & {
@@ -141,7 +153,7 @@ declare const _default: {
141
153
  onChange?: ((...args: any[]) => any) | undefined;
142
154
  "onField-input"?: ((...args: any[]) => any) | undefined;
143
155
  "onField-change"?: ((...args: any[]) => any) | undefined;
144
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
156
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
145
157
  $attrs: {
146
158
  [x: string]: unknown;
147
159
  };
@@ -171,6 +183,16 @@ declare const _default: {
171
183
  } & {
172
184
  default: () => {};
173
185
  };
186
+ lastValues: {
187
+ type: import("vue").PropType<Object>;
188
+ } & {
189
+ default: () => {};
190
+ };
191
+ isCompare: {
192
+ type: import("vue").PropType<boolean>;
193
+ } & {
194
+ default: boolean;
195
+ };
174
196
  keyProp: {
175
197
  type: import("vue").PropType<string>;
176
198
  } & {
@@ -220,6 +242,7 @@ declare const _default: {
220
242
  "onField-change"?: ((...args: any[]) => any) | undefined;
221
243
  }, {
222
244
  values: import("vue").Ref<import("./schema").FormValue>;
245
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
223
246
  formState: import("./schema").FormState;
224
247
  initialized: import("vue").Ref<boolean>;
225
248
  changeHandler: () => void;
@@ -228,6 +251,8 @@ declare const _default: {
228
251
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], string, {
229
252
  config: FormConfig;
230
253
  initValues: Object;
254
+ lastValues: Object;
255
+ isCompare: boolean;
231
256
  keyProp: string;
232
257
  parentValues: Object;
233
258
  labelWidth: string;
@@ -272,6 +297,16 @@ declare const _default: {
272
297
  } & {
273
298
  default: () => {};
274
299
  };
300
+ lastValues: {
301
+ type: import("vue").PropType<Object>;
302
+ } & {
303
+ default: () => {};
304
+ };
305
+ isCompare: {
306
+ type: import("vue").PropType<boolean>;
307
+ } & {
308
+ default: boolean;
309
+ };
275
310
  keyProp: {
276
311
  type: import("vue").PropType<string>;
277
312
  } & {
@@ -321,6 +356,7 @@ declare const _default: {
321
356
  "onField-change"?: ((...args: any[]) => any) | undefined;
322
357
  } & import("vue").ShallowUnwrapRef<{
323
358
  values: import("vue").Ref<import("./schema").FormValue>;
359
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
324
360
  formState: import("./schema").FormState;
325
361
  initialized: import("vue").Ref<boolean>;
326
362
  changeHandler: () => void;
@@ -383,6 +419,8 @@ declare const _default: {
383
419
  $props: Partial<{
384
420
  config: FormConfig;
385
421
  initValues: Object;
422
+ lastValues: Object;
423
+ isCompare: boolean;
386
424
  keyProp: string;
387
425
  parentValues: Object;
388
426
  labelWidth: string;
@@ -407,6 +445,16 @@ declare const _default: {
407
445
  } & {
408
446
  default: () => {};
409
447
  };
448
+ lastValues: {
449
+ type: import("vue").PropType<Object>;
450
+ } & {
451
+ default: () => {};
452
+ };
453
+ isCompare: {
454
+ type: import("vue").PropType<boolean>;
455
+ } & {
456
+ default: boolean;
457
+ };
410
458
  keyProp: {
411
459
  type: import("vue").PropType<string>;
412
460
  } & {
@@ -454,7 +502,7 @@ declare const _default: {
454
502
  onChange?: ((...args: any[]) => any) | undefined;
455
503
  "onField-input"?: ((...args: any[]) => any) | undefined;
456
504
  "onField-change"?: ((...args: any[]) => any) | undefined;
457
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
505
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
458
506
  $attrs: {
459
507
  [x: string]: unknown;
460
508
  };
@@ -484,6 +532,16 @@ declare const _default: {
484
532
  } & {
485
533
  default: () => {};
486
534
  };
535
+ lastValues: {
536
+ type: import("vue").PropType<Object>;
537
+ } & {
538
+ default: () => {};
539
+ };
540
+ isCompare: {
541
+ type: import("vue").PropType<boolean>;
542
+ } & {
543
+ default: boolean;
544
+ };
487
545
  keyProp: {
488
546
  type: import("vue").PropType<string>;
489
547
  } & {
@@ -533,6 +591,7 @@ declare const _default: {
533
591
  "onField-change"?: ((...args: any[]) => any) | undefined;
534
592
  }, {
535
593
  values: import("vue").Ref<import("./schema").FormValue>;
594
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
536
595
  formState: import("./schema").FormState;
537
596
  initialized: import("vue").Ref<boolean>;
538
597
  changeHandler: () => void;
@@ -541,6 +600,8 @@ declare const _default: {
541
600
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], string, {
542
601
  config: FormConfig;
543
602
  initValues: Object;
603
+ lastValues: Object;
604
+ isCompare: boolean;
544
605
  keyProp: string;
545
606
  parentValues: Object;
546
607
  labelWidth: string;
@@ -585,6 +646,16 @@ declare const _default: {
585
646
  } & {
586
647
  default: () => {};
587
648
  };
649
+ lastValues: {
650
+ type: import("vue").PropType<Object>;
651
+ } & {
652
+ default: () => {};
653
+ };
654
+ isCompare: {
655
+ type: import("vue").PropType<boolean>;
656
+ } & {
657
+ default: boolean;
658
+ };
588
659
  keyProp: {
589
660
  type: import("vue").PropType<string>;
590
661
  } & {
@@ -634,6 +705,7 @@ declare const _default: {
634
705
  "onField-change"?: ((...args: any[]) => any) | undefined;
635
706
  } & import("vue").ShallowUnwrapRef<{
636
707
  values: import("vue").Ref<import("./schema").FormValue>;
708
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
637
709
  formState: import("./schema").FormState;
638
710
  initialized: import("vue").Ref<boolean>;
639
711
  changeHandler: () => void;
@@ -676,6 +748,8 @@ declare const _default: {
676
748
  $props: Partial<{
677
749
  config: FormConfig;
678
750
  initValues: Object;
751
+ lastValues: Object;
752
+ isCompare: boolean;
679
753
  keyProp: string;
680
754
  parentValues: Object;
681
755
  labelWidth: string;
@@ -700,6 +774,16 @@ declare const _default: {
700
774
  } & {
701
775
  default: () => {};
702
776
  };
777
+ lastValues: {
778
+ type: import("vue").PropType<Object>;
779
+ } & {
780
+ default: () => {};
781
+ };
782
+ isCompare: {
783
+ type: import("vue").PropType<boolean>;
784
+ } & {
785
+ default: boolean;
786
+ };
703
787
  keyProp: {
704
788
  type: import("vue").PropType<string>;
705
789
  } & {
@@ -747,7 +831,7 @@ declare const _default: {
747
831
  onChange?: ((...args: any[]) => any) | undefined;
748
832
  "onField-input"?: ((...args: any[]) => any) | undefined;
749
833
  "onField-change"?: ((...args: any[]) => any) | undefined;
750
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
834
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "config" | "initValues" | "lastValues" | "isCompare" | "keyProp" | "parentValues" | "labelWidth" | "disabled" | "stepActive" | "height" | "inline" | "labelPosition">;
751
835
  $attrs: {
752
836
  [x: string]: unknown;
753
837
  };
@@ -777,6 +861,16 @@ declare const _default: {
777
861
  } & {
778
862
  default: () => {};
779
863
  };
864
+ lastValues: {
865
+ type: import("vue").PropType<Object>;
866
+ } & {
867
+ default: () => {};
868
+ };
869
+ isCompare: {
870
+ type: import("vue").PropType<boolean>;
871
+ } & {
872
+ default: boolean;
873
+ };
780
874
  keyProp: {
781
875
  type: import("vue").PropType<string>;
782
876
  } & {
@@ -826,6 +920,7 @@ declare const _default: {
826
920
  "onField-change"?: ((...args: any[]) => any) | undefined;
827
921
  }, {
828
922
  values: import("vue").Ref<import("./schema").FormValue>;
923
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
829
924
  formState: import("./schema").FormState;
830
925
  initialized: import("vue").Ref<boolean>;
831
926
  changeHandler: () => void;
@@ -834,6 +929,8 @@ declare const _default: {
834
929
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "field-input" | "field-change")[], string, {
835
930
  config: FormConfig;
836
931
  initValues: Object;
932
+ lastValues: Object;
933
+ isCompare: boolean;
837
934
  keyProp: string;
838
935
  parentValues: Object;
839
936
  labelWidth: string;
@@ -878,6 +975,16 @@ declare const _default: {
878
975
  } & {
879
976
  default: () => {};
880
977
  };
978
+ lastValues: {
979
+ type: import("vue").PropType<Object>;
980
+ } & {
981
+ default: () => {};
982
+ };
983
+ isCompare: {
984
+ type: import("vue").PropType<boolean>;
985
+ } & {
986
+ default: boolean;
987
+ };
881
988
  keyProp: {
882
989
  type: import("vue").PropType<string>;
883
990
  } & {
@@ -927,6 +1034,7 @@ declare const _default: {
927
1034
  "onField-change"?: ((...args: any[]) => any) | undefined;
928
1035
  } & import("vue").ShallowUnwrapRef<{
929
1036
  values: import("vue").Ref<import("./schema").FormValue>;
1037
+ lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
930
1038
  formState: import("./schema").FormState;
931
1039
  initialized: import("vue").Ref<boolean>;
932
1040
  changeHandler: () => void;
@@ -1,6 +1,8 @@
1
1
  import { ChildConfig } from '../schema';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
3
  model: any;
4
+ lastValues?: any;
5
+ isCompare?: boolean | undefined;
4
6
  config: ChildConfig;
5
7
  labelWidth?: string | undefined;
6
8
  expandMore?: boolean | undefined;
@@ -8,8 +10,10 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
10
  size?: string | undefined;
9
11
  prop?: string | undefined;
10
12
  disabled?: boolean | undefined;
11
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "addDiffCount")[], "change" | "addDiffCount", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
14
  model: any;
15
+ lastValues?: any;
16
+ isCompare?: boolean | undefined;
13
17
  config: ChildConfig;
14
18
  labelWidth?: string | undefined;
15
19
  expandMore?: boolean | undefined;
@@ -19,6 +23,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
19
23
  disabled?: boolean | undefined;
20
24
  }>>> & {
21
25
  onChange?: ((...args: any[]) => any) | undefined;
26
+ onAddDiffCount?: ((...args: any[]) => any) | undefined;
22
27
  }, {}>;
23
28
  export default _default;
24
29
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,6 +1,9 @@
1
1
  import { ChildConfig, FormValue } from '../schema';
2
2
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ /** 表单值 */
3
4
  model: FormValue;
5
+ /** 需对比的值(开启对比模式时传入) */
6
+ lastValues?: FormValue | undefined;
4
7
  config: ChildConfig;
5
8
  prop?: string | undefined;
6
9
  disabled?: boolean | undefined;
@@ -8,12 +11,19 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
8
11
  expandMore?: boolean | undefined;
9
12
  stepActive?: string | number | undefined;
10
13
  size?: string | undefined;
14
+ /** 是否开启对比模式 */
15
+ isCompare?: boolean | undefined;
11
16
  }>, {
12
17
  prop: string;
13
18
  size: string;
14
19
  expandMore: boolean;
15
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
20
+ lastValues: () => {};
21
+ isCompare: boolean;
22
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "addDiffCount")[], "change" | "addDiffCount", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
23
+ /** 表单值 */
16
24
  model: FormValue;
25
+ /** 需对比的值(开启对比模式时传入) */
26
+ lastValues?: FormValue | undefined;
17
27
  config: ChildConfig;
18
28
  prop?: string | undefined;
19
29
  disabled?: boolean | undefined;
@@ -21,13 +31,20 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
21
31
  expandMore?: boolean | undefined;
22
32
  stepActive?: string | number | undefined;
23
33
  size?: string | undefined;
34
+ /** 是否开启对比模式 */
35
+ isCompare?: boolean | undefined;
24
36
  }>, {
25
37
  prop: string;
26
38
  size: string;
27
39
  expandMore: boolean;
40
+ lastValues: () => {};
41
+ isCompare: boolean;
28
42
  }>>> & {
29
43
  onChange?: ((...args: any[]) => any) | undefined;
44
+ onAddDiffCount?: ((...args: any[]) => any) | undefined;
30
45
  }, {
46
+ lastValues: FormValue;
47
+ isCompare: boolean;
31
48
  prop: string;
32
49
  expandMore: boolean;
33
50
  size: string;
@@ -4,26 +4,37 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
4
4
  prop: string;
5
5
  size?: string | undefined;
6
6
  model: Record<string, any>;
7
+ lastValues?: Record<string, any> | undefined;
8
+ isCompare?: boolean | undefined;
7
9
  config: FieldsetConfig;
8
10
  rules?: any;
9
11
  disabled?: boolean | undefined;
10
12
  }>, {
11
13
  rules: {};
12
14
  prop: string;
13
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
+ lastValues: () => {};
16
+ isCompare: boolean;
17
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "addDiffCount")[], "change" | "addDiffCount", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
14
18
  labelWidth?: string | undefined;
15
19
  prop: string;
16
20
  size?: string | undefined;
17
21
  model: Record<string, any>;
22
+ lastValues?: Record<string, any> | undefined;
23
+ isCompare?: boolean | undefined;
18
24
  config: FieldsetConfig;
19
25
  rules?: any;
20
26
  disabled?: boolean | undefined;
21
27
  }>, {
22
28
  rules: {};
23
29
  prop: string;
30
+ lastValues: () => {};
31
+ isCompare: boolean;
24
32
  }>>> & {
25
33
  onChange?: ((...args: any[]) => any) | undefined;
34
+ onAddDiffCount?: ((...args: any[]) => any) | undefined;
26
35
  }, {
36
+ lastValues: Record<string, any>;
37
+ isCompare: boolean;
27
38
  rules: any;
28
39
  prop: string;
29
40
  }>;