@tmagic/form 1.2.15 → 1.3.0-alpha.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 (47) hide show
  1. package/dist/style.css +3 -0
  2. package/dist/tmagic-form.js +38 -20
  3. package/dist/tmagic-form.js.map +1 -1
  4. package/dist/tmagic-form.umd.cjs +38 -20
  5. package/dist/tmagic-form.umd.cjs.map +1 -1
  6. package/package.json +3 -3
  7. package/src/containers/Container.vue +1 -1
  8. package/src/fields/Cascader.vue +2 -1
  9. package/src/fields/Checkbox.vue +1 -0
  10. package/src/fields/CheckboxGroup.vue +1 -0
  11. package/src/fields/ColorPicker.vue +1 -0
  12. package/src/fields/Date.vue +1 -0
  13. package/src/fields/DateTime.vue +1 -0
  14. package/src/fields/Daterange.vue +1 -0
  15. package/src/fields/Display.vue +1 -0
  16. package/src/fields/DynamicField.vue +1 -0
  17. package/src/fields/Hidden.vue +1 -0
  18. package/src/fields/Link.vue +1 -0
  19. package/src/fields/Number.vue +1 -0
  20. package/src/fields/RadioGroup.vue +1 -0
  21. package/src/fields/Select.vue +1 -0
  22. package/src/fields/Switch.vue +1 -0
  23. package/src/fields/Text.vue +1 -0
  24. package/src/fields/Textarea.vue +1 -0
  25. package/src/fields/Time.vue +1 -0
  26. package/src/schema.ts +3 -1
  27. package/src/theme/form.scss +6 -0
  28. package/types/containers/Table.vue.d.ts +2 -2
  29. package/types/fields/Cascader.vue.d.ts +2 -0
  30. package/types/fields/Checkbox.vue.d.ts +2 -0
  31. package/types/fields/CheckboxGroup.vue.d.ts +2 -0
  32. package/types/fields/ColorPicker.vue.d.ts +2 -0
  33. package/types/fields/Date.vue.d.ts +2 -0
  34. package/types/fields/DateTime.vue.d.ts +2 -0
  35. package/types/fields/Daterange.vue.d.ts +2 -0
  36. package/types/fields/Display.vue.d.ts +2 -0
  37. package/types/fields/DynamicField.vue.d.ts +2 -0
  38. package/types/fields/Hidden.vue.d.ts +2 -0
  39. package/types/fields/Link.vue.d.ts +2 -0
  40. package/types/fields/Number.vue.d.ts +2 -0
  41. package/types/fields/RadioGroup.vue.d.ts +2 -0
  42. package/types/fields/Select.vue.d.ts +2 -0
  43. package/types/fields/Switch.vue.d.ts +2 -0
  44. package/types/fields/Text.vue.d.ts +2 -0
  45. package/types/fields/Textarea.vue.d.ts +2 -0
  46. package/types/fields/Time.vue.d.ts +2 -0
  47. package/types/schema.d.ts +2 -3
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.15",
2
+ "version": "1.3.0-alpha.0",
3
3
  "name": "@tmagic/form",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@element-plus/icons-vue": "^2.0.9",
39
- "@tmagic/design": "1.2.15",
40
- "@tmagic/utils": "1.2.15",
39
+ "@tmagic/design": "1.3.0-alpha.0",
40
+ "@tmagic/utils": "1.3.0-alpha.0",
41
41
  "lodash-es": "^4.17.21",
42
42
  "sortablejs": "^1.14.0",
43
43
  "vue": "^3.2.37"
@@ -317,7 +317,7 @@ const display = computed((): boolean => {
317
317
  return value;
318
318
  });
319
319
 
320
- const itemLabelWidth = computed(() => props.config.labelWidth || props.labelWidth);
320
+ const itemLabelWidth = computed(() => props.config.labelWidth ?? props.labelWidth);
321
321
 
322
322
  watchEffect(() => {
323
323
  expand.value = props.expandMore;
@@ -32,6 +32,7 @@ const props = defineProps<{
32
32
  prop: string;
33
33
  disabled?: boolean;
34
34
  size?: 'large' | 'default' | 'small';
35
+ lastValues?: Record<string, any>;
35
36
  }>();
36
37
 
37
38
  const emit = defineEmits(['change']);
@@ -85,7 +86,7 @@ if (typeof props.config.options === 'function' && props.model && mForm) {
85
86
  watchEffect(
86
87
  () => (options.value = (props.config.options as Function)(mForm, { model: props.model, formValues: mForm.values })),
87
88
  );
88
- } else if (!props.config.options || !props.config.options.length || props.config.remote) {
89
+ } else if (!props.config.options?.length || props.config.remote) {
89
90
  Promise.resolve(setRemoteOptions());
90
91
  }
91
92
 
@@ -27,6 +27,7 @@ const props = defineProps<{
27
27
  prop: string;
28
28
  disabled?: boolean;
29
29
  size?: 'large' | 'default' | 'small';
30
+ lastValues?: Record<string, any>;
30
31
  }>();
31
32
 
32
33
  const emit = defineEmits(['change']);
@@ -29,6 +29,7 @@ const props = defineProps<{
29
29
  prop: string;
30
30
  disabled?: boolean;
31
31
  size?: 'large' | 'default' | 'small';
32
+ lastValues?: Record<string, any>;
32
33
  }>();
33
34
 
34
35
  const emit = defineEmits(['change']);
@@ -23,6 +23,7 @@ const props = defineProps<{
23
23
  prop: string;
24
24
  disabled?: boolean;
25
25
  size?: 'large' | 'default' | 'small';
26
+ lastValues?: Record<string, any>;
26
27
  }>();
27
28
 
28
29
  const emit = defineEmits(['change']);
@@ -27,6 +27,7 @@ const props = defineProps<{
27
27
  prop: string;
28
28
  disabled?: boolean;
29
29
  size?: 'large' | 'default' | 'small';
30
+ lastValues?: Record<string, any>;
30
31
  }>();
31
32
 
32
33
  const emit = defineEmits(['change']);
@@ -29,6 +29,7 @@ const props = defineProps<{
29
29
  prop: string;
30
30
  disabled?: boolean;
31
31
  size?: 'large' | 'default' | 'small';
32
+ lastValues?: Record<string, any>;
32
33
  }>();
33
34
 
34
35
  const emit = defineEmits(['change']);
@@ -31,6 +31,7 @@ const props = defineProps<{
31
31
  prop: string;
32
32
  disabled?: boolean;
33
33
  size?: 'large' | 'default' | 'small';
34
+ lastValues?: Record<string, any>;
34
35
  }>();
35
36
 
36
37
  const emit = defineEmits(['change']);
@@ -13,6 +13,7 @@ const props = defineProps<{
13
13
  values?: any;
14
14
  name: string;
15
15
  prop: string;
16
+ lastValues?: Record<string, any>;
16
17
  }>();
17
18
 
18
19
  if (props.config.initValue && props.model) {
@@ -40,6 +40,7 @@ const props = defineProps<{
40
40
  prop: string;
41
41
  disabled?: boolean;
42
42
  size?: 'large' | 'default' | 'small';
43
+ lastValues?: Record<string, any>;
43
44
  }>();
44
45
 
45
46
  const emit = defineEmits(['change']);
@@ -13,6 +13,7 @@ const props = defineProps<{
13
13
  values?: any;
14
14
  name: string;
15
15
  prop: string;
16
+ lastValues?: Record<string, any>;
16
17
  }>();
17
18
 
18
19
  useAddField(props.prop);
@@ -34,6 +34,7 @@ const props = defineProps<{
34
34
  prop: string;
35
35
  disabled?: boolean;
36
36
  size?: 'large' | 'default' | 'small';
37
+ lastValues?: Record<string, any>;
37
38
  }>();
38
39
 
39
40
  const emit = defineEmits(['change']);
@@ -32,6 +32,7 @@ const props = defineProps<{
32
32
  prop: string;
33
33
  disabled?: boolean;
34
34
  size?: 'large' | 'default' | 'small';
35
+ lastValues?: Record<string, any>;
35
36
  }>();
36
37
 
37
38
  const emit = defineEmits(['change', 'input']);
@@ -25,6 +25,7 @@ const props = defineProps<{
25
25
  prop: string;
26
26
  disabled?: boolean;
27
27
  size?: 'large' | 'default' | 'small';
28
+ lastValues?: Record<string, any>;
28
29
  }>();
29
30
 
30
31
  const emit = defineEmits(['change']);
@@ -46,6 +46,7 @@ const props = defineProps<{
46
46
  prop: string;
47
47
  disabled?: boolean;
48
48
  size?: 'large' | 'default' | 'small';
49
+ lastValues?: Record<string, any>;
49
50
  }>();
50
51
 
51
52
  const emit = defineEmits(['change']);
@@ -26,6 +26,7 @@ const props = defineProps<{
26
26
  prop: string;
27
27
  disabled?: boolean;
28
28
  size?: 'large' | 'default' | 'small';
29
+ lastValues?: Record<string, any>;
29
30
  }>();
30
31
 
31
32
  const emit = defineEmits(['change']);
@@ -41,6 +41,7 @@ const props = defineProps<{
41
41
  prop: string;
42
42
  disabled?: boolean;
43
43
  size?: 'large' | 'default' | 'small';
44
+ lastValues?: Record<string, any>;
44
45
  }>();
45
46
 
46
47
  const emit = defineEmits(['change', 'input']);
@@ -29,6 +29,7 @@ const props = defineProps<{
29
29
  prop: string;
30
30
  disabled?: boolean;
31
31
  size?: 'large' | 'default' | 'small';
32
+ lastValues?: Record<string, any>;
32
33
  }>();
33
34
 
34
35
  const emit = defineEmits(['change', 'input']);
@@ -25,6 +25,7 @@ const props = defineProps<{
25
25
  prop: string;
26
26
  disabled?: boolean;
27
27
  size?: 'large' | 'default' | 'small';
28
+ lastValues?: Record<string, any>;
28
29
  }>();
29
30
 
30
31
  const emit = defineEmits(['change']);
package/src/schema.ts CHANGED
@@ -87,6 +87,7 @@ export interface FormItem {
87
87
  dynamicKey?: string;
88
88
  /** 是否需要显示`展开更多配置` */
89
89
  expand?: boolean;
90
+ [key: string]: any;
90
91
  }
91
92
 
92
93
  export interface ContainerCommonConfig {
@@ -567,6 +568,7 @@ export interface TabPaneConfig {
567
568
  onTabClick?: (mForm: FormState | undefined, tab: any, data: any) => void;
568
569
  [key: string]: any;
569
570
  }
571
+
570
572
  export interface TabConfig extends FormItem, ContainerCommonConfig {
571
573
  type: 'tab' | 'dynamic-tab';
572
574
  tabType?: string;
@@ -718,6 +720,6 @@ export type ChildConfig =
718
720
  | DynamicFieldConfig
719
721
  | ComponentConfig;
720
722
 
721
- export type FormConfig = (ChildConfig & { [key: string]: any })[];
723
+ export type FormConfig = ChildConfig[];
722
724
 
723
725
  export type FormValue = Record<string | number, any>;
@@ -34,4 +34,10 @@
34
34
  display: none;
35
35
  }
36
36
  }
37
+
38
+ .t-form__item.hidden {
39
+ > .t-form__label {
40
+ display: none;
41
+ }
42
+ }
37
43
  }
@@ -47,14 +47,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
47
47
  isCompare: boolean;
48
48
  }>>> & {
49
49
  onChange?: ((...args: any[]) => any) | undefined;
50
- onAddDiffCount?: ((...args: any[]) => any) | undefined;
51
50
  onSelect?: ((...args: any[]) => any) | undefined;
51
+ onAddDiffCount?: ((...args: any[]) => any) | undefined;
52
52
  }, {
53
53
  lastValues: any;
54
54
  isCompare: boolean;
55
55
  enableToggleMode: boolean;
56
- prop: string;
57
56
  showIndex: boolean;
57
+ prop: string;
58
58
  sortKey: string;
59
59
  }>, {
60
60
  operateCol: (_: {
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: CascaderConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: CheckboxConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: CheckboxGroupConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: ColorPickConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: DateConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: DateTimeConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: DaterangeConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
6
6
  values?: any;
7
7
  name: string;
8
8
  prop: string;
9
+ lastValues?: Record<string, any> | undefined;
9
10
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
11
  config: DisplayConfig;
11
12
  model: any;
@@ -13,6 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
13
14
  values?: any;
14
15
  name: string;
15
16
  prop: string;
17
+ lastValues?: Record<string, any> | undefined;
16
18
  }>>>, {}>;
17
19
  export default _default;
18
20
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
17
  prop: string;
18
18
  disabled?: boolean | undefined;
19
19
  size?: "default" | "small" | "large" | undefined;
20
+ lastValues?: Record<string, any> | undefined;
20
21
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
21
22
  config: DynamicFieldConfig;
22
23
  model: any;
@@ -26,6 +27,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
26
27
  prop: string;
27
28
  disabled?: boolean | undefined;
28
29
  size?: "default" | "small" | "large" | undefined;
30
+ lastValues?: Record<string, any> | undefined;
29
31
  }>>> & {
30
32
  onChange?: ((...args: any[]) => any) | undefined;
31
33
  }, {}>;
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
6
6
  values?: any;
7
7
  name: string;
8
8
  prop: string;
9
+ lastValues?: Record<string, any> | undefined;
9
10
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
10
11
  config: HiddenConfig;
11
12
  model: any;
@@ -13,6 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
13
14
  values?: any;
14
15
  name: string;
15
16
  prop: string;
17
+ lastValues?: Record<string, any> | undefined;
16
18
  }>>>, {}>;
17
19
  export default _default;
18
20
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: LinkConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "input")[], "change" | "input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: NumberConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  onInput?: ((...args: any[]) => any) | undefined;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: RadioGroupConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: SelectConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: SwitchConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "input")[], "change" | "input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: TextConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  onInput?: ((...args: any[]) => any) | undefined;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "input")[], "change" | "input", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: TextareaConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  onInput?: ((...args: any[]) => any) | undefined;
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
8
8
  prop: string;
9
9
  disabled?: boolean | undefined;
10
10
  size?: "default" | "small" | "large" | undefined;
11
+ lastValues?: Record<string, any> | undefined;
11
12
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
13
  config: TimeConfig;
13
14
  model: any;
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
17
18
  prop: string;
18
19
  disabled?: boolean | undefined;
19
20
  size?: "default" | "small" | "large" | undefined;
21
+ lastValues?: Record<string, any> | undefined;
20
22
  }>>> & {
21
23
  onChange?: ((...args: any[]) => any) | undefined;
22
24
  }, {}>;
package/types/schema.d.ts CHANGED
@@ -65,6 +65,7 @@ export interface FormItem {
65
65
  dynamicKey?: string;
66
66
  /** 是否需要显示`展开更多配置` */
67
67
  expand?: boolean;
68
+ [key: string]: any;
68
69
  }
69
70
  export interface ContainerCommonConfig {
70
71
  items: FormConfig;
@@ -567,8 +568,6 @@ export interface ComponentConfig extends FormItem {
567
568
  display: any;
568
569
  }
569
570
  export type ChildConfig = FormItem | TabConfig | RowConfig | FieldsetConfig | PanelConfig | TableConfig | GroupListConfig | StepConfig | DisplayConfig | TextConfig | HiddenConfig | LinkConfig | DaterangeConfig | SelectConfig | CascaderConfig | HtmlField | DateConfig | ColorPickConfig | TimeConfig | DateTimeConfig | CheckboxConfig | SwitchConfig | RadioGroupConfig | TextareaConfig | DynamicFieldConfig | ComponentConfig;
570
- export type FormConfig = (ChildConfig & {
571
- [key: string]: any;
572
- })[];
571
+ export type FormConfig = ChildConfig[];
573
572
  export type FormValue = Record<string | number, any>;
574
573
  export {};