@qin-ui/antd-vue-pro 2.1.15 → 2.2.1

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 (124) hide show
  1. package/AI-CONTEXT.md +52 -38
  2. package/LICENSE +9 -0
  3. package/api.json +42 -31
  4. package/es/antd-vue-pro.css +9 -9
  5. package/es/components/component-provider/components/index.vue.d.ts +35 -0
  6. package/es/components/component-provider/components/index.vue.d.ts.map +1 -0
  7. package/es/components/component-provider/constants/index.d.ts +16 -0
  8. package/es/components/component-provider/constants/index.d.ts.map +1 -0
  9. package/es/components/component-provider/index.d.ts +4 -0
  10. package/es/components/component-provider/index.d.ts.map +1 -0
  11. package/es/components/component-provider/types/index.d.ts +63 -0
  12. package/es/components/component-provider/types/index.d.ts.map +1 -0
  13. package/es/components/form/components/BaseField/index.vue.d.ts +13 -0
  14. package/es/components/form/components/BaseField/index.vue.d.ts.map +1 -0
  15. package/es/components/form/components/BaseField/utils/index.d.ts +3 -0
  16. package/es/components/form/components/BaseField/utils/index.d.ts.map +1 -0
  17. package/es/components/form/components/BaseFormItem/index.vue.d.ts +9 -0
  18. package/es/components/form/components/BaseFormItem/index.vue.d.ts.map +1 -0
  19. package/es/components/form/components/ContainerFragment/index.vue.d.ts +23 -0
  20. package/es/components/form/components/ContainerFragment/index.vue.d.ts.map +1 -0
  21. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts +29 -0
  22. package/es/components/form/components/GroupedFieldAttrs/index.vue.d.ts.map +1 -0
  23. package/es/components/form/components/PathProvider/index.vue.d.ts +24 -0
  24. package/es/components/form/components/PathProvider/index.vue.d.ts.map +1 -0
  25. package/es/components/form/components/ProForm/index.vue.d.ts +36 -0
  26. package/es/components/form/components/ProForm/index.vue.d.ts.map +1 -0
  27. package/es/components/form/components/SlotComponent/index.vue.d.ts +7 -0
  28. package/es/components/form/components/SlotComponent/index.vue.d.ts.map +1 -0
  29. package/es/components/form/components/index.d.ts +12 -0
  30. package/es/components/form/components/index.d.ts.map +1 -0
  31. package/es/components/form/constants/index.d.ts +78 -0
  32. package/es/components/form/constants/index.d.ts.map +1 -0
  33. package/es/components/form/hooks/index.d.ts +5 -0
  34. package/es/components/form/hooks/index.d.ts.map +1 -0
  35. package/es/components/form/hooks/useFields.d.ts +57 -0
  36. package/es/components/form/hooks/useFields.d.ts.map +1 -0
  37. package/es/components/form/hooks/useForm.d.ts +93 -0
  38. package/es/components/form/hooks/useForm.d.ts.map +1 -0
  39. package/es/components/form/hooks/useFormRef.d.ts +30 -0
  40. package/es/components/form/hooks/useFormRef.d.ts.map +1 -0
  41. package/es/components/form/index.d.ts +7 -0
  42. package/es/components/form/index.d.ts.map +1 -0
  43. package/es/components/form/types/index.d.ts +207 -0
  44. package/es/components/form/types/index.d.ts.map +1 -0
  45. package/es/components/table/components/ColumnControl.vue.d.ts +9 -0
  46. package/es/components/table/components/ColumnControl.vue.d.ts.map +1 -0
  47. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts +18 -0
  48. package/es/components/table/components/DefaultSearchFormContainer.vue.d.ts.map +1 -0
  49. package/es/components/table/components/DefaultTableContainer.vue.d.ts +18 -0
  50. package/es/components/table/components/DefaultTableContainer.vue.d.ts.map +1 -0
  51. package/es/components/table/components/ProTable.vue.d.ts +100 -0
  52. package/es/components/table/components/ProTable.vue.d.ts.map +1 -0
  53. package/es/components/table/components/SearchForm.vue.d.ts +48 -0
  54. package/es/components/table/components/SearchForm.vue.d.ts.map +1 -0
  55. package/es/components/table/components/SizeControl.vue.d.ts +12 -0
  56. package/es/components/table/components/SizeControl.vue.d.ts.map +1 -0
  57. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts +3 -0
  58. package/es/components/table/components/icons/ColumnHeightOutlined.vue.d.ts.map +1 -0
  59. package/es/components/table/components/icons/DownOutlined.vue.d.ts +3 -0
  60. package/es/components/table/components/icons/DownOutlined.vue.d.ts.map +1 -0
  61. package/es/components/table/components/icons/FilterOutlined.vue.d.ts +3 -0
  62. package/es/components/table/components/icons/FilterOutlined.vue.d.ts.map +1 -0
  63. package/es/components/table/components/index.d.ts +5 -0
  64. package/es/components/table/components/index.d.ts.map +1 -0
  65. package/es/components/table/hooks/index.d.ts +2 -0
  66. package/es/components/table/hooks/index.d.ts.map +1 -0
  67. package/es/components/table/hooks/useTable.d.ts +112 -0
  68. package/es/components/table/hooks/useTable.d.ts.map +1 -0
  69. package/es/components/table/index.d.ts +8 -0
  70. package/es/components/table/index.d.ts.map +1 -0
  71. package/es/components/table/types/index.d.ts +70 -0
  72. package/es/components/table/types/index.d.ts.map +1 -0
  73. package/es/index.d.ts +76 -1622
  74. package/es/index.d.ts.map +1 -0
  75. package/es/index.js +1314 -25
  76. package/es/index.js.map +1 -0
  77. package/es/shared/core/index.d.ts +6 -0
  78. package/es/shared/core/index.d.ts.map +1 -0
  79. package/es/shared/ui/index.d.ts +15 -0
  80. package/es/shared/ui/index.d.ts.map +1 -0
  81. package/package.json +20 -17
  82. package/src/components/component-provider/components/index.vue +81 -0
  83. package/src/components/component-provider/constants/index.ts +165 -0
  84. package/src/components/component-provider/index.ts +6 -0
  85. package/src/components/component-provider/types/index.ts +90 -0
  86. package/src/components/form/components/BaseField/index.vue +188 -0
  87. package/src/components/form/components/BaseField/utils/index.ts +16 -0
  88. package/src/components/form/components/BaseFormItem/index.vue +163 -0
  89. package/src/components/form/components/ContainerFragment/index.vue +24 -0
  90. package/src/components/form/components/GroupedFieldAttrs/index.vue +118 -0
  91. package/src/components/form/components/PathProvider/index.vue +19 -0
  92. package/src/components/form/components/ProForm/index.vue +109 -0
  93. package/src/components/form/components/SlotComponent/index.vue +26 -0
  94. package/src/components/form/components/index.ts +15 -0
  95. package/src/components/form/constants/index.ts +135 -0
  96. package/src/components/form/hooks/index.ts +5 -0
  97. package/src/components/form/hooks/useFields.ts +67 -0
  98. package/src/components/form/hooks/useForm.ts +110 -0
  99. package/src/components/form/hooks/useFormRef.ts +35 -0
  100. package/src/components/form/index.ts +29 -0
  101. package/src/components/form/types/index.ts +271 -0
  102. package/src/components/table/components/ColumnControl.vue +132 -0
  103. package/src/components/table/components/DefaultSearchFormContainer.vue +20 -0
  104. package/src/components/table/components/DefaultTableContainer.vue +20 -0
  105. package/src/components/table/components/ProTable.vue +366 -0
  106. package/src/components/table/components/SearchForm.vue +295 -0
  107. package/src/components/table/components/SizeControl.vue +59 -0
  108. package/src/components/table/components/icons/ColumnHeightOutlined.vue +4 -0
  109. package/src/components/table/components/icons/DownOutlined.vue +4 -0
  110. package/src/components/table/components/icons/FilterOutlined.vue +4 -0
  111. package/src/components/table/components/index.ts +4 -0
  112. package/src/components/table/hooks/index.ts +1 -0
  113. package/src/components/table/hooks/useTable.ts +130 -0
  114. package/src/components/table/index.ts +14 -0
  115. package/src/components/table/types/index.ts +74 -0
  116. package/src/index.ts +80 -0
  117. package/src/shared/core/index.ts +37 -0
  118. package/src/shared/ui/index.ts +60 -0
  119. package/es/component-provider/index-Dmz32tSB.js +0 -174
  120. package/es/component-provider/index.js +0 -4
  121. package/es/core/index-ghYuQ3Sy.js +0 -360
  122. package/es/form/index.js +0 -451
  123. package/es/table/index.js +0 -703
  124. package/es/vendor/utils/lodash-es-p6jau26B.js +0 -1120
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,EACL,UAAU,EACX,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE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AAA;CAAE,GAAG,OAAO,CAC9C,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,UAAU,CAAC,CAC1C,EACD,CAAC,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,KAAK,CACf,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,IAAI,GAAG,IAAI,IACnB,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Columns } from '../types';
2
+ import { Table } from '../hooks/useTable';
3
+ type Props = {
4
+ columns: Columns;
5
+ table?: Table;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
9
+ //# sourceMappingURL=ColumnControl.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ColumnControl.vue"],"names":[],"mappings":"AA+IA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;;AAyPF,wBAOG"}
@@ -0,0 +1,18 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
18
+ //# sourceMappingURL=DefaultSearchFormContainer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultSearchFormContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultSearchFormContainer.vue"],"names":[],"mappings":"AA2BA,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
18
+ //# sourceMappingURL=DefaultTableContainer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultTableContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/DefaultTableContainer.vue"],"names":[],"mappings":"AA2BA,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,100 @@
1
+ import { TableProps, ColumnType } from '../../../shared/ui';
2
+ import { Slot } from 'vue';
3
+ import { ContainerComponent } from '../../form/types';
4
+ import { SearchFormProps } from './SearchForm.vue';
5
+ import { Table } from '../hooks/useTable';
6
+ import { Column } from '../types';
7
+ declare const _default: <T extends Table<any> = Table>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
9
+ readonly "onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
10
+ readonly "onUpdate:loading"?: ((value: boolean) => any) | undefined;
11
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:size" | "onUpdate:loading"> & ({
12
+ size?: TableProps["size"];
13
+ loading?: boolean;
14
+ } & {
15
+ table?: T;
16
+ search?: () => Promise<unknown>;
17
+ addIndexColumn?: boolean;
18
+ immediateSearch?: boolean;
19
+ control?: boolean | Partial<{
20
+ sizeControl: boolean;
21
+ columnControl: boolean;
22
+ }>;
23
+ searchFormConfig?: Omit<SearchFormProps, "form"> & {
24
+ hidden?: boolean;
25
+ container?: ContainerComponent | false;
26
+ };
27
+ tableContainer?: ContainerComponent | false;
28
+ } & TableProps<any>) & Partial<{}>> & import('vue').PublicProps;
29
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
30
+ attrs: any;
31
+ slots: Readonly<Omit<Omit<Readonly<{
32
+ emptyText?: any;
33
+ expandIcon?: Slot<import('ant-design-vue/es/vc-table/interface').RenderExpandIconProps<any> | undefined> | undefined;
34
+ title?: any;
35
+ footer?: any;
36
+ summary?: any;
37
+ expandedRowRender?: any;
38
+ expandColumnTitle?: any;
39
+ bodyCell?: ((props: {
40
+ text: any;
41
+ value: any;
42
+ record: Record<string, any>;
43
+ index: number;
44
+ column: import('ant-design-vue/es/table/interface').ColumnType<any>;
45
+ }) => void) | undefined;
46
+ headerCell?: ((props: {
47
+ title: any;
48
+ column: import('ant-design-vue/es/table/interface').ColumnType<any>;
49
+ }) => void) | undefined;
50
+ customFilterIcon?: any;
51
+ customFilterDropdown?: any;
52
+ default: any;
53
+ }>, "bodyCell"> & Readonly<{
54
+ bodyCell?: (props: {
55
+ text: any;
56
+ value: any;
57
+ record: T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never;
58
+ index: number;
59
+ column: Column<T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never>;
60
+ }) => void;
61
+ }> & Readonly<Partial<Record<"table" | "search-form" | "button-bar" | "toolbar", Slot>>>, "default">> & Omit<Omit<Readonly<{
62
+ emptyText?: any;
63
+ expandIcon?: Slot<import('ant-design-vue/es/vc-table/interface').RenderExpandIconProps<any> | undefined> | undefined;
64
+ title?: any;
65
+ footer?: any;
66
+ summary?: any;
67
+ expandedRowRender?: any;
68
+ expandColumnTitle?: any;
69
+ bodyCell?: ((props: {
70
+ text: any;
71
+ value: any;
72
+ record: Record<string, any>;
73
+ index: number;
74
+ column: import('ant-design-vue/es/table/interface').ColumnType<any>;
75
+ }) => void) | undefined;
76
+ headerCell?: ((props: {
77
+ title: any;
78
+ column: import('ant-design-vue/es/table/interface').ColumnType<any>;
79
+ }) => void) | undefined;
80
+ customFilterIcon?: any;
81
+ customFilterDropdown?: any;
82
+ default: any;
83
+ }>, "bodyCell"> & Readonly<{
84
+ bodyCell?: (props: {
85
+ text: any;
86
+ value: any;
87
+ record: T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never;
88
+ index: number;
89
+ column: Column<T extends Table<any, infer R extends import('@qin-ui/pro-components-core').Data> ? R : never>;
90
+ }) => void;
91
+ }> & Readonly<Partial<Record<"table" | "search-form" | "button-bar" | "toolbar", Slot>>>, "default">;
92
+ emit: ((evt: "update:size", value: import('ant-design-vue/es/button').ButtonSize) => void) & ((evt: "update:loading", value: boolean) => void);
93
+ }>) => import('vue').VNode & {
94
+ __ctx?: Awaited<typeof __VLS_setup>;
95
+ };
96
+ export default _default;
97
+ type __VLS_PrettifyLocal<T> = {
98
+ [K in keyof T]: T[K];
99
+ } & {};
100
+ //# sourceMappingURL=ProTable.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/ProTable.vue"],"names":[],"mappings":"AAAA,OAiZO,EAGL,UAAU,EACV,UAAU,EAEX,MAAM,oBAAo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,CAAC,iEAnClC,CAAC;SAC5B,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;mBANC,CAAC,KAAK,EAAE;YACjB,IAAI,EAAE,GAAG,CAAC;YACV,KAAK,EAAE,GAAG,CAAC;YACX,MAAM,6BAqCqD,CAAC,iEArCzC;YACnB,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,4BAmC6C,CAAC,iEAnClC,CAAC;SAC5B,KAAK,IAAI;;;EAkVV,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3bzE,wBA2b4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { FormProps } from '../../../shared/ui';
2
+ import { AllowedComponentProps, Component, DefineComponent } from 'vue';
3
+ import { Form } from '../../form';
4
+ type Expand = {
5
+ minExpandRows?: number;
6
+ expandStatus?: boolean;
7
+ };
8
+ type _FormProps = Pick<Partial<FormProps>, 'colon' | 'disabled' | 'hideRequiredMark' | 'labelAlign' | 'labelCol' | 'labelWrap' | 'name' | 'wrapperCol'>;
9
+ type ButtonProps = {
10
+ onClick: () => void;
11
+ };
12
+ type ExpandButtonProps = ButtonProps & {
13
+ expandStatus: boolean;
14
+ };
15
+ export type SearchFormProps = {
16
+ form: Form;
17
+ layout?: 'grid' | 'inline';
18
+ expand?: boolean | Expand;
19
+ searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
20
+ resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
21
+ expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
22
+ rowGap?: number;
23
+ columnGap?: number;
24
+ } & /* @vue-ignore */ _FormProps & AllowedComponentProps;
25
+ declare const _default: __VLS_WithTemplateSlots<DefineComponent<SearchFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
+ reset: () => any;
27
+ search: () => any;
28
+ }, string, import('vue').PublicProps, Readonly<SearchFormProps> & Readonly<{
29
+ onReset?: (() => any) | undefined;
30
+ onSearch?: (() => any) | undefined;
31
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
32
+ 'reset-button'?(_: {
33
+ onClick: () => void;
34
+ }): any;
35
+ 'search-button'?(_: {
36
+ onClick: () => void;
37
+ }): any;
38
+ 'expand-button'?(_: {
39
+ onClick: () => void;
40
+ }): any;
41
+ }>;
42
+ export default _default;
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
48
+ //# sourceMappingURL=SearchForm.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SearchForm.vue"],"names":[],"mappings":"AAAA,OA2TO,EAAiB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,qBAAqB,EAKrB,KAAK,SAAS,EACd,KAAK,eAAe,EACrB,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAIvC,KAAK,MAAM,GAAG;IAEZ,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CACpB,OAAO,CAAC,SAAS,CAAC,EAChB,OAAO,GACP,UAAU,GACV,kBAAkB,GAClB,YAAY,GACZ,UAAU,GACV,WAAW,GACX,MAAM,GACN,YAAY,CACf,CAAC;AAEF,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAC3C,KAAK,iBAAiB,GAAG,WAAW,GAAG;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC7E,WAAW,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5E,YAAY,CAAC,EACT,SAAS,CAAC,iBAAiB,CAAC,GAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAAC,UAAU,GAC9B,qBAAqB,CAAC;;;;;;;;;;QAuVa,GAAG;;;QACF,GAAG;;;QACH,GAAG;;AAvVzC,wBAoYK;AAQL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { TableProps } from '../../../shared/ui';
2
+ type Size = TableProps['size'];
3
+ type __VLS_PublicProps = {
4
+ 'size'?: Size;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:size": (value: import('ant-design-vue/es/button').ButtonSize) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ "onUpdate:size"?: ((value: import('ant-design-vue/es/button').ButtonSize) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
12
+ //# sourceMappingURL=SizeControl.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SizeControl.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/SizeControl.vue"],"names":[],"mappings":"AA6DA,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAG5B,KAAK,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAqB/B,KAAK,iBAAiB,GAAG;IACzB,MAAM,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;;;;;;AA2GF,wBAQG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=ColumnHeightOutlined.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnHeightOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/ColumnHeightOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=DownOutlined.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DownOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/DownOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=FilterOutlined.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterOutlined.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/components/icons/FilterOutlined.vue"],"names":[],"mappings":";AAkDA,wBAKG"}
@@ -0,0 +1,5 @@
1
+ export { default as DefaultSearchFormContainer } from './DefaultSearchFormContainer.vue';
2
+ export { default as DefaultTableContainer } from './DefaultTableContainer.vue';
3
+ export { default as SizeControl } from './SizeControl.vue';
4
+ export { default as ColumnControl } from './ColumnControl.vue';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './useTable';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,112 @@
1
+ import { Table as _Table, Data, ExtendWithAny, DeepPartial, PageParam } from '../../../shared/core';
2
+ import { Column, Columns } from '../types';
3
+ import { Fields } from '../../form/types';
4
+ /**
5
+ * 表格实例类型
6
+ *
7
+ * @description 在 core Table 类型的基础上,将列类型 C 绑定为本地 Column<T>,
8
+ * 使 columns 操作获得 Ant Design Vue 表格列的完整属性类型提示。
9
+ *
10
+ * @template D - 搜索表单数据类型
11
+ * @template T - 表格行数据类型(一行数据的类型)
12
+ *
13
+ * @property columns - 列配置数组(响应式 Ref),用于渲染表格列
14
+ * @property dataSource - 表格数据源(响应式 Ref),绑定到 Table 的 data-source
15
+ * @property pageParam - 分页参数(响应式 reactive),包含 current、pageSize、total
16
+ * @property searchForm - 搜索表单实例(Form 类型),用于管理搜索区域的字段和数据
17
+ * @property setColumn - 更新列配置,支持合并/覆盖两种模式,用法同 setField
18
+ * @property deleteColumn - 删除列,支持路径或查找函数
19
+ * @property appendColumn - 在指定列后追加新列,传 undefined 在末尾追加
20
+ * @property prependColumn - 在指定列前插入新列,传 undefined 在开头插入
21
+ * @property setPageParam - 设置分页参数,支持部分更新和函数式更新
22
+ * @property resetQueryParams - 重置分页到第一页并恢复搜索条件到初始值
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * interface SearchParams { keyword: string }
27
+ * interface User { name: string; age: number }
28
+ *
29
+ * const table: Table<SearchParams, User> = useTable({
30
+ * columns: [{ dataIndex: 'name', title: '姓名' }],
31
+ * })
32
+ *
33
+ * table.columns.value // 访问列配置
34
+ * table.setColumn('name', { width: 150 }) // 更新列
35
+ * table.setPageParam({ current: 2 }) // 切换页码
36
+ * table.searchForm.setFormData('keyword', '搜索词') // 操作搜索表单
37
+ * ```
38
+ *
39
+ * @public
40
+ */
41
+ export type Table<D extends Data = Data, T extends Data = ExtendWithAny<D>> = _Table<D, T, Column<T>>;
42
+ /**
43
+ * 创建表格实例的 Hook
44
+ *
45
+ * @description 基于 `@qin-ui/pro-components-core` 的 `useTable`,将列类型绑定为本地 `Column<T>`。
46
+ * 是 ProTable 组件的核心 Hook,提供了:
47
+ * - 列配置管理(增删改查)
48
+ * - 数据源管理
49
+ * - 分页管理
50
+ * - 搜索表单集成(内部使用 useForm)
51
+ * - 查询参数重置
52
+ *
53
+ * @template D - 搜索表单数据类型
54
+ * @template T - 表格行数据类型
55
+ *
56
+ * @param {object} params - 表格配置参数
57
+ * @param {Columns<T>} [params.columns] - 初始列配置数组
58
+ * @param {T[]} [params.dataSource] - 初始数据源
59
+ * @param {PageParam} [params.pageParam] - 初始分页参数,默认 `{ current: 1, pageSize: 10, total: 0 }`
60
+ * @param {ExtendWithAny<DeepPartial<D>>} [params.searchParam] - 初始搜索参数
61
+ * @param {Fields<D>} [params.searchFields] - 搜索表单字段配置
62
+ *
63
+ * @returns {Table<D, T>} 表格实例
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * interface SearchParams { keyword: string; status: string }
68
+ * interface User { name: string; age: number; email: string }
69
+ *
70
+ * const table = useTable<SearchParams, User>({
71
+ * columns: [
72
+ * { dataIndex: 'name', title: '姓名', width: 120 },
73
+ * { dataIndex: 'age', title: '年龄', width: 80 },
74
+ * ],
75
+ * dataSource: [],
76
+ * pageParam: { current: 1, pageSize: 20, total: 0 },
77
+ * searchParam: { keyword: '', status: '' },
78
+ * searchFields: [
79
+ * { path: 'keyword', label: '关键词', component: 'input' },
80
+ * { path: 'status', label: '状态', component: 'select' },
81
+ * ],
82
+ * })
83
+ *
84
+ * // 查询
85
+ * const handleSearch = async () => {
86
+ * const res = await fetchUserList({
87
+ * ...table.searchForm.formData,
88
+ * ...table.pageParam,
89
+ * })
90
+ * table.dataSource.value = res.data
91
+ * table.setPageParam({ total: res.total })
92
+ * }
93
+ *
94
+ * // 重置
95
+ * const handleReset = () => {
96
+ * table.resetQueryParams()
97
+ * handleSearch()
98
+ * }
99
+ * ```
100
+ *
101
+ * @see {@link coreUseTable} 底层核心实现(来自 @qin-ui/pro-components-core)
102
+ *
103
+ * @public
104
+ */
105
+ export declare function useTable<D extends Data = Data, T extends Data = ExtendWithAny<D>>(params: {
106
+ columns?: Columns<T>;
107
+ dataSource?: T[];
108
+ pageParam?: PageParam;
109
+ searchParam?: ExtendWithAny<DeepPartial<D>>;
110
+ searchFields?: Fields<D>;
111
+ }): Table<D, T>;
112
+ //# sourceMappingURL=useTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,KAAK,IAAI,MAAM,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,IAAI,EACJ,aAAa,EACb,WAAW,EACX,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,KAAK,CACf,CAAC,SAAS,IAAI,GAAG,IAAI,EACrB,CAAC,SAAS,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,IAC/B,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,QAAQ,CACtB,CAAC,SAAS,IAAI,GAAG,IAAI,EACrB,CAAC,SAAS,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,EACjC,MAAM,EAAE;IACR,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC1B,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAEd"}
@@ -0,0 +1,8 @@
1
+ import { ComponentExposed, ComponentProps } from 'vue-component-type-helpers';
2
+ import { default as ProTable } from './components/ProTable.vue';
3
+ export type ProTableProps = ComponentProps<typeof ProTable>;
4
+ export type ProTableInstance = ComponentExposed<typeof ProTable>;
5
+ export { type Column, type Columns } from './types';
6
+ export { useTable, type Table } from './hooks';
7
+ export default ProTable;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAGjD,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,OAAO,QAAQ,CAAC,CAAC;AAGjE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { ColumnType } from '../../../shared/ui';
2
+ import { Data, KeyExpandString, Paths, Path } from '../../../shared/core';
3
+ /**
4
+ * @qin-ui/antd-vue-pro 表格列配置类型
5
+ *
6
+ * @description 继承 Ant Design Vue 的 ColumnType 列类型,并添加:
7
+ * - 类型安全的 dataIndex(基于泛型 D 推导路径),优先使用
8
+ * - key 作为辅助标识,当 dataIndex 不满足需求时使用
9
+ * - hidden 属性用于控制列显隐
10
+ * - 所有 Ant Design Vue 原生的列属性依然可用(title、width、fixed、align 等)
11
+ *
12
+ * @template D - 表格行数据类型
13
+ * @public
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * interface User { name: string; age: number }
18
+ *
19
+ * const columns: Columns<User> = [
20
+ * {
21
+ * // dataIndex 是主要字段,关联数据源中对应字段路径
22
+ * dataIndex: 'name',
23
+ * title: '姓名',
24
+ * width: 120,
25
+ * },
26
+ * {
27
+ * dataIndex: 'age',
28
+ * title: '年龄',
29
+ * width: 80,
30
+ * },
31
+ * ]
32
+ * ```
33
+ */
34
+ export type Column<D extends Data = Data> = Omit<ColumnType, 'dataIndex' | 'key'> & {
35
+ /**
36
+ * @description 列数据路径(主要字段)
37
+ * 关联数据源中对应字段的路径,支持点号分隔的深层路径和数组路径。
38
+ * 优先使用 dataIndex 进行字段匹配。
39
+ *
40
+ * @example 'name' | 'address.city' | ['address', 'city']
41
+ */
42
+ dataIndex?: KeyExpandString<Extract<keyof D, string>> | Paths<D>;
43
+ /**
44
+ * @description 列字段标识(辅助字段)
45
+ * 仅当 dataIndex 无法满足需求时使用,例如需要在自定义渲染中标识列时。
46
+ * 在字段匹配时的优先级低于 dataIndex。
47
+ */
48
+ key?: Path<D>;
49
+ /**
50
+ * @description 是否隐藏该列
51
+ * @default false
52
+ */
53
+ hidden?: boolean;
54
+ };
55
+ /**
56
+ * @qin-ui/antd-vue-pro 表格列配置数组类型
57
+ *
58
+ * @template D - 表格行数据类型
59
+ * @public
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const columns: Columns<User> = [
64
+ * { dataIndex: 'name', title: '姓名' },
65
+ * { dataIndex: 'age', title: '年龄' },
66
+ * ]
67
+ * ```
68
+ */
69
+ export type Columns<D extends Data = Data> = Array<Column<D>>;
70
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,IAAI,CAC9C,UAAU,EACV,WAAW,GAAG,KAAK,CACpB,GAAG;IACF;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjE;;;;OAIG;IACH,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC"}