ax-libs 0.0.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 (73) hide show
  1. package/README.md +5 -0
  2. package/dist/api/basic/controller/BaseController.d.ts +8 -0
  3. package/dist/api/basic/controller/MenuController.d.ts +6 -0
  4. package/dist/api/basic/controller/UserController.d.ts +8 -0
  5. package/dist/api/basic/entity/Menu.d.ts +22 -0
  6. package/dist/api/basic/entity/Role.d.ts +10 -0
  7. package/dist/api/basic/entity/Tenant.d.ts +10 -0
  8. package/dist/api/basic/entity/User.d.ts +19 -0
  9. package/dist/api/basic/entity/dto/Account.d.ts +8 -0
  10. package/dist/api/basic/entity/vo/UserInfo.d.ts +11 -0
  11. package/dist/api/common/BaseData.d.ts +13 -0
  12. package/dist/api/common/Result.d.ts +6 -0
  13. package/dist/ax-lib.css +1 -0
  14. package/dist/ax-lib.js +20592 -0
  15. package/dist/hooks/common/useComponentPool.d.ts +28 -0
  16. package/dist/hooks/common/useDefineProps.d.ts +3 -0
  17. package/dist/hooks/core/useFetch.d.ts +28 -0
  18. package/dist/hooks/core/useList.d.ts +71 -0
  19. package/dist/hooks/core/useState.d.ts +7 -0
  20. package/dist/hooks/index.d.ts +12 -0
  21. package/dist/hooks/ui/exposed/useFormExposed.d.ts +11 -0
  22. package/dist/hooks/ui/exposed/useTableExposed.d.ts +15 -0
  23. package/dist/hooks/ui/useAxButon.d.ts +4 -0
  24. package/dist/hooks/ui/useAxModal.d.ts +8 -0
  25. package/dist/index.d.ts +4 -0
  26. package/dist/plugin/index.d.ts +1 -0
  27. package/dist/plugin/ui.d.ts +10 -0
  28. package/dist/test/main.d.ts +0 -0
  29. package/dist/ui/button/components/button/button.vue.d.ts +25 -0
  30. package/dist/ui/button/components/button/index.d.ts +29 -0
  31. package/dist/ui/button/components/button/props.d.ts +15 -0
  32. package/dist/ui/button/components/fields/index.d.ts +1 -0
  33. package/dist/ui/button/index.d.ts +3 -0
  34. package/dist/ui/button/util/index.d.ts +3 -0
  35. package/dist/ui/form/components/fields/index.d.ts +1 -0
  36. package/dist/ui/form/components/form/form.vue.d.ts +35 -0
  37. package/dist/ui/form/components/form/index.d.ts +57 -0
  38. package/dist/ui/form/components/form/props.d.ts +14 -0
  39. package/dist/ui/form/components/form-item/form-item.vue.d.ts +21 -0
  40. package/dist/ui/form/components/form-item/index.d.ts +39 -0
  41. package/dist/ui/form/components/form-item/props.d.ts +14 -0
  42. package/dist/ui/form/index.d.ts +4 -0
  43. package/dist/ui/form/util/index.d.ts +8 -0
  44. package/dist/ui/index.d.ts +4 -0
  45. package/dist/ui/modal/components/form-modal/form-modal.vue.d.ts +38 -0
  46. package/dist/ui/modal/components/form-modal/index.d.ts +98 -0
  47. package/dist/ui/modal/components/form-modal/props.d.ts +25 -0
  48. package/dist/ui/modal/components/modal/index.d.ts +47 -0
  49. package/dist/ui/modal/components/modal/modal.vue.d.ts +26 -0
  50. package/dist/ui/modal/components/modal/props.d.ts +20 -0
  51. package/dist/ui/modal/index.d.ts +3 -0
  52. package/dist/ui/modal/util/index.d.ts +1 -0
  53. package/dist/ui/table/components/table/index.d.ts +105 -0
  54. package/dist/ui/table/components/table/props.d.ts +36 -0
  55. package/dist/ui/table/components/table/table.vue.d.ts +39 -0
  56. package/dist/ui/table/components/table-column/index.d.ts +3 -0
  57. package/dist/ui/table/components/table-column/props.d.ts +3 -0
  58. package/dist/ui/table/components/table-column/table-column.vue.d.ts +4 -0
  59. package/dist/ui/table/components/table-page/index.d.ts +5 -0
  60. package/dist/ui/table/components/table-page/props.d.ts +5 -0
  61. package/dist/ui/table/components/table-page/table-page.vue.d.ts +4 -0
  62. package/dist/ui/table/components/table-select/index.d.ts +69 -0
  63. package/dist/ui/table/components/table-select/props.d.ts +18 -0
  64. package/dist/ui/table/components/table-select/table-select.vue.d.ts +44 -0
  65. package/dist/ui/table/index.d.ts +4 -0
  66. package/dist/ui/table/util/index.d.ts +1 -0
  67. package/dist/utils/bus.d.ts +1 -0
  68. package/dist/utils/index.d.ts +5 -0
  69. package/dist/utils/object.d.ts +16 -0
  70. package/dist/utils/request.d.ts +12 -0
  71. package/dist/utils/type.d.ts +19 -0
  72. package/dist/utils/ui.d.ts +1 -0
  73. package/package.json +45 -0
@@ -0,0 +1,98 @@
1
+ import { default as modal } from './form-modal.vue';
2
+ import { ComponentExposed } from 'vue-component-type-helpers';
3
+ export * from './props';
4
+ export declare const AxFormModal: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
5
+ attrs: any;
6
+ emit: ((evt: "change", data: T) => void) & ((evt: "update:open", data: boolean) => void) & ((evt: "confirm", data: T) => void);
7
+ slots: {
8
+ default?: (props: {}) => any;
9
+ } & {
10
+ footer?: (props: {}) => any;
11
+ };
12
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
13
+ props: import('vue').PublicProps & {
14
+ size?: "" | "default" | "small" | "large" | undefined;
15
+ title?: string | undefined;
16
+ appendTo?: (string | HTMLElement) | undefined;
17
+ top?: string | undefined;
18
+ transition?: import('element-plus').DialogTransition | undefined;
19
+ direction?: "ltr" | "rtl" | "ttb" | "btt" | undefined;
20
+ resizable?: boolean | undefined;
21
+ withHeader?: boolean | undefined;
22
+ modalFade?: boolean | undefined;
23
+ headerAriaLevel?: string | undefined;
24
+ appendToBody?: boolean | undefined;
25
+ beforeClose?: import('element-plus').DialogBeforeCloseFn | undefined;
26
+ destroyOnClose?: boolean | undefined;
27
+ closeOnClickModal?: boolean | undefined;
28
+ closeOnPressEscape?: boolean | undefined;
29
+ lockScroll?: boolean | undefined;
30
+ modal?: boolean | undefined;
31
+ modalPenetrable?: boolean | undefined;
32
+ openDelay?: number | undefined;
33
+ closeDelay?: number | undefined;
34
+ modalClass?: string | undefined;
35
+ width?: string | number | undefined;
36
+ zIndex?: number | undefined;
37
+ trapFocus?: boolean | undefined;
38
+ center?: boolean | undefined;
39
+ alignCenter?: boolean | undefined;
40
+ closeIcon?: import('element-plus/es/utils/vue/icon.mjs').IconPropType | undefined;
41
+ draggable?: boolean | undefined;
42
+ overflow?: boolean | undefined;
43
+ fullscreen?: boolean | undefined;
44
+ headerClass?: string | undefined;
45
+ bodyClass?: string | undefined;
46
+ footerClass?: string | undefined;
47
+ showClose?: boolean | undefined;
48
+ ariaLevel?: string | undefined;
49
+ disabled?: boolean | undefined;
50
+ loading?: boolean | undefined;
51
+ rules?: import('element-plus').FormRules | undefined;
52
+ labelPosition?: "left" | "right" | "top" | undefined;
53
+ requireAsteriskPosition?: "left" | "right" | undefined;
54
+ labelWidth?: string | number | undefined;
55
+ labelSuffix?: string | undefined;
56
+ inline?: boolean | undefined;
57
+ inlineMessage?: boolean | undefined;
58
+ statusIcon?: boolean | undefined;
59
+ showMessage?: boolean | undefined;
60
+ validateOnRuleChange?: boolean | undefined;
61
+ hideRequiredAsterisk?: boolean | undefined;
62
+ scrollToError?: boolean | undefined;
63
+ scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
64
+ submitButton?: import('../../..').AxButtonProps | undefined;
65
+ type?: "dialog" | "drawer" | undefined;
66
+ open?: boolean | undefined;
67
+ okConfig?: import('../../..').AxButtonProps | undefined;
68
+ cancelConfig?: import('../../..').AxButtonProps | undefined;
69
+ footer?: boolean | undefined;
70
+ onChange?: ((data: T) => any) | undefined;
71
+ "onUpdate:open"?: ((data: boolean) => any) | undefined;
72
+ onConfirm?: ((data: T) => any) | undefined;
73
+ } & (typeof globalThis extends {
74
+ __VLS_PROPS_FALLBACK: infer P;
75
+ } ? P : {});
76
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
77
+ getValues: () => T;
78
+ getFlForm: () => import('element-plus').FormInstance | undefined;
79
+ getFields: () => (keyof T)[];
80
+ getDefaultValues: () => {} & Record<string, any>;
81
+ setValues: (data: Partial<T>) => void;
82
+ resetValues: () => void;
83
+ clearValues: () => void;
84
+ getModal: () => import('element-plus').DrawerInstance | undefined;
85
+ close: () => void;
86
+ }>) => void;
87
+ attrs: any;
88
+ slots: {
89
+ default?: (props: {}) => any;
90
+ } & {
91
+ footer?: (props: {}) => any;
92
+ };
93
+ emit: ((evt: "change", data: T) => void) & ((evt: "update:open", data: boolean) => void) & ((evt: "confirm", data: T) => void);
94
+ }>) => import('vue').VNode & {
95
+ __ctx?: Awaited<typeof __VLS_setup>;
96
+ };
97
+ export type AxFormModalInstance = ComponentExposed<typeof modal>;
98
+ export default AxFormModal;
@@ -0,0 +1,25 @@
1
+ import { DrawerProps, DrawerEmits } from 'element-plus';
2
+ import { AxButtonOptions, AxButtonProps } from '../../../button';
3
+ import { EmitsToProps } from '../../../../utils';
4
+ import { EmitsToProps as VueProps } from 'vue';
5
+ import { FieldsConfig } from '../../../../hooks/common/useComponentPool.ts';
6
+ import { AxFormItemOptions, AxFormProps } from '../../../form';
7
+ import { FetchOptions, RequestFetch } from '../../../../hooks';
8
+ export type AxFormModalProps = Omit<DrawerProps, 'modelValue'> & Omit<AxFormProps, 'isDefault'> & {
9
+ type?: 'dialog' | 'drawer';
10
+ open?: boolean;
11
+ okConfig?: AxButtonProps;
12
+ cancelConfig?: AxButtonProps;
13
+ footer?: boolean;
14
+ };
15
+ export interface AxFormModalEmits<T> {
16
+ "update:open": [data: boolean];
17
+ 'confirm': [data: T];
18
+ 'change': [data: T];
19
+ }
20
+ export interface AxFormModalOptions<T extends Record<string, any>, R = any> extends AxFormModalProps, EmitsToProps<AxFormModalEmits<T>>, VueProps<DrawerEmits> {
21
+ buttonConfig?: FieldsConfig<AxButtonOptions>;
22
+ fieldsConfig?: FieldsConfig<AxFormItemOptions<T>>;
23
+ apiConfig?: FetchOptions<T, R>;
24
+ api?: RequestFetch<T, R>;
25
+ }
@@ -0,0 +1,47 @@
1
+ import { default as modal } from './modal.vue';
2
+ export * from './props';
3
+ export declare const AxModal: {
4
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./props').AxModalProps> & Readonly<{
5
+ "onUpdate:open"?: ((data: boolean) => any) | undefined;
6
+ onConfirm?: ((data?: void | undefined) => any) | undefined;
7
+ }>, {
8
+ getModal: () => import('element-plus').DrawerInstance | undefined;
9
+ close: () => void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ "update:open": (data: boolean) => any;
12
+ confirm: (data: void) => any;
13
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
14
+ P: {};
15
+ B: {};
16
+ D: {};
17
+ C: {};
18
+ M: {};
19
+ Defaults: {};
20
+ }, Readonly<import('./props').AxModalProps> & Readonly<{
21
+ "onUpdate:open"?: ((data: boolean) => any) | undefined;
22
+ onConfirm?: ((data?: void | undefined) => any) | undefined;
23
+ }>, {
24
+ getModal: () => import('element-plus').DrawerInstance | undefined;
25
+ close: () => void;
26
+ }, {}, {}, {}, {}>;
27
+ __isFragment?: never;
28
+ __isTeleport?: never;
29
+ __isSuspense?: never;
30
+ } & import('vue').ComponentOptionsBase<Readonly<import('./props').AxModalProps> & Readonly<{
31
+ "onUpdate:open"?: ((data: boolean) => any) | undefined;
32
+ onConfirm?: ((data?: void | undefined) => any) | undefined;
33
+ }>, {
34
+ getModal: () => import('element-plus').DrawerInstance | undefined;
35
+ close: () => void;
36
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
+ "update:open": (data: boolean) => any;
38
+ confirm: (data: void) => any;
39
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
40
+ $slots: {
41
+ default?: (props: {}) => any;
42
+ } & {
43
+ footer?: (props: {}) => any;
44
+ };
45
+ });
46
+ export type AxModalInstance = InstanceType<typeof modal>;
47
+ export default AxModal;
@@ -0,0 +1,26 @@
1
+ import { DrawerInstance } from 'element-plus';
2
+ import { AxModalProps } from './props';
3
+ declare var __VLS_23: {}, __VLS_40: {};
4
+ type __VLS_Slots = {} & {
5
+ default?: (props: typeof __VLS_23) => any;
6
+ } & {
7
+ footer?: (props: typeof __VLS_40) => any;
8
+ };
9
+ declare const __VLS_base: import('vue').DefineComponent<AxModalProps, {
10
+ getModal: () => DrawerInstance | undefined;
11
+ close: () => void;
12
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:open": (data: boolean) => any;
14
+ confirm: (data: void) => any;
15
+ }, string, import('vue').PublicProps, Readonly<AxModalProps> & Readonly<{
16
+ "onUpdate:open"?: ((data: boolean) => any) | undefined;
17
+ onConfirm?: ((data?: void | undefined) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,20 @@
1
+ import { DrawerProps, DrawerEmits } from 'element-plus';
2
+ import { AxButtonOptions, AxButtonProps } from '../../../button';
3
+ import { EmitsToProps } from '../../../../utils';
4
+ import { EmitsToProps as VueProps } from 'vue';
5
+ import { FieldsConfig } from '../../../../hooks/common/useComponentPool.ts';
6
+ export interface AxModalProps extends Omit<DrawerProps, 'modelValue'> {
7
+ type?: 'dialog' | 'drawer';
8
+ open?: boolean;
9
+ okConfig?: AxButtonProps;
10
+ cancelConfig?: AxButtonProps;
11
+ footer?: boolean;
12
+ }
13
+ export interface AxModalEmits {
14
+ "update:open": [data: boolean];
15
+ 'confirm': [data: void];
16
+ }
17
+ export interface AxModalOptions extends AxModalProps, EmitsToProps<AxModalEmits>, VueProps<DrawerEmits> {
18
+ buttonConfig?: FieldsConfig<AxButtonOptions>;
19
+ slot?: any;
20
+ }
@@ -0,0 +1,3 @@
1
+ export * from './components/modal';
2
+ export * from './components/form-modal';
3
+ export * from './util';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,105 @@
1
+ import { default as table } from './table.vue';
2
+ import { ComponentExposed } from 'vue-component-type-helpers';
3
+ export * from './props';
4
+ export declare const AxTable: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
5
+ attrs: any;
6
+ emit: {};
7
+ slots: {
8
+ search?: (props: {}) => any;
9
+ } & {
10
+ tool?: (props: {}) => any;
11
+ } & {
12
+ default?: (props: {}) => any;
13
+ } & {
14
+ footer?: (props: {}) => any;
15
+ };
16
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
17
+ props: import('vue').PublicProps & {
18
+ dataSource?: T[] | undefined;
19
+ api?: import('../../../..').RequestFetch<any, import('../../../..').PageData<T> | T[]> | undefined;
20
+ apiConfig?: import('../../../..').FetchOptions<any, import('../../../..').PageData<T> | T[]> | undefined;
21
+ data?: T[] | undefined;
22
+ size?: import('element-plus').ComponentSize | undefined;
23
+ width?: string | number | undefined;
24
+ height?: string | number | undefined;
25
+ maxHeight?: string | number | undefined;
26
+ fit?: boolean | undefined;
27
+ stripe?: boolean | undefined;
28
+ border?: boolean | undefined;
29
+ rowKey?: string | ((row: T) => string) | undefined;
30
+ context?: import('element-plus').Table<T> | undefined;
31
+ showHeader?: boolean | undefined;
32
+ showSummary?: boolean | undefined;
33
+ sumText?: string | undefined;
34
+ summaryMethod?: import('element-plus').SummaryMethod<T> | undefined;
35
+ rowClassName?: import('element-plus').ColumnCls<T> | undefined;
36
+ rowStyle?: import('element-plus').ColumnStyle<T> | undefined;
37
+ cellClassName?: import('element-plus').CellCls<T> | undefined;
38
+ cellStyle?: import('element-plus').CellStyle<T> | undefined;
39
+ headerRowClassName?: import('element-plus').ColumnCls<T> | undefined;
40
+ headerRowStyle?: import('element-plus').ColumnStyle<T> | undefined;
41
+ headerCellClassName?: import('element-plus').CellCls<T> | undefined;
42
+ headerCellStyle?: import('element-plus').CellStyle<T> | undefined;
43
+ highlightCurrentRow?: boolean | undefined;
44
+ currentRowKey?: string | number | undefined;
45
+ emptyText?: string | undefined;
46
+ expandRowKeys?: Array<string> | undefined;
47
+ defaultExpandAll?: boolean | undefined;
48
+ rowExpandable?: ((row: T, index: number) => boolean) | undefined;
49
+ defaultSort?: import('element-plus').Sort | undefined;
50
+ tooltipEffect?: string | undefined;
51
+ tooltipOptions?: import('element-plus/es/components/table/src/util.mjs').TableOverflowTooltipOptions | undefined;
52
+ spanMethod?: ((data: {
53
+ row: T;
54
+ rowIndex: number;
55
+ column: import('element-plus').TableColumnCtx<T>;
56
+ columnIndex: number;
57
+ }) => number[] | {
58
+ rowspan: number;
59
+ colspan: number;
60
+ } | undefined) | undefined;
61
+ selectOnIndeterminate?: boolean | undefined;
62
+ indent?: number | undefined;
63
+ treeProps?: import('element-plus/es/components/table/src/table/defaults.mjs').TreeProps | undefined;
64
+ lazy?: boolean | undefined;
65
+ load?: ((row: T, treeNode: import('element-plus').TreeNode, resolve: (data: T[]) => void) => void) | undefined;
66
+ className?: string | undefined;
67
+ style?: import('vue').StyleValue;
68
+ tableLayout?: ("fixed" | "auto") | undefined;
69
+ scrollbarAlwaysOn?: boolean | undefined;
70
+ flexible?: boolean | undefined;
71
+ showOverflowTooltip?: (boolean | import('element-plus/es/components/table/src/util.mjs').TableOverflowTooltipOptions) | undefined;
72
+ tooltipFormatter?: import('element-plus/es/components/table/src/util.mjs').TableOverflowTooltipFormatter<T> | undefined;
73
+ appendFilterPanelTo?: string | undefined;
74
+ scrollbarTabindex?: number | string | undefined;
75
+ nativeScrollbar?: boolean | undefined;
76
+ } & (typeof globalThis extends {
77
+ __VLS_PROPS_FALLBACK: infer P;
78
+ } ? P : {});
79
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
80
+ getElTable: () => import('element-plus').TableInstance | undefined;
81
+ setConfig: import('../../../..').StateApi<import('../../../..').FetchOptions<any, import('../../../..').PageData<T> | T[]>>;
82
+ setApi: import('../../../..').StateApi<import('../../../..').RequestFetch<any, import('../../../..').PageData<T> | T[]>>;
83
+ load: (params?: any) => Promise<any>;
84
+ getConfig: () => import('../../../..').FetchOptions<any, import('../../../..').PageData<T> | T[]>;
85
+ get: () => any;
86
+ getReady: () => boolean;
87
+ setParams: (data: any, load?: boolean) => void;
88
+ reload: () => void;
89
+ }>) => void;
90
+ attrs: any;
91
+ slots: {
92
+ search?: (props: {}) => any;
93
+ } & {
94
+ tool?: (props: {}) => any;
95
+ } & {
96
+ default?: (props: {}) => any;
97
+ } & {
98
+ footer?: (props: {}) => any;
99
+ };
100
+ emit: {};
101
+ }>) => import('vue').VNode & {
102
+ __ctx?: Awaited<typeof __VLS_setup>;
103
+ };
104
+ export type AxTableInstance = ComponentExposed<typeof table>;
105
+ export default AxTable;
@@ -0,0 +1,36 @@
1
+ import { TableProps } from 'element-plus';
2
+ import { FetchOptions, RequestFetch } from '../../../../hooks';
3
+ import { PageData } from '../../../../utils';
4
+ import { FieldsConfig } from '../../../../hooks/common/useComponentPool.ts';
5
+ import { AxTableColumnProps, AxTablePageProps, AxTableSelectOptions } from '../..';
6
+ import { AxButtonOptions } from '../../../button';
7
+ export interface AxTableProps<T extends Record<string, any> = any> extends Partial<TableProps<T>> {
8
+ dataSource?: T[];
9
+ api?: RequestFetch<any, T[] | PageData<T>>;
10
+ apiConfig?: FetchOptions<any, T[] | PageData<T>>;
11
+ }
12
+ export type AxTableOptions<T extends Record<string, any> = any> = Partial<AxTableProps<T>> & {
13
+ columnsConfig?: FieldsConfig<AxTableColumnProps>;
14
+ pageConfig?: AxTablePageProps;
15
+ searchForm?: AxTableSelectOptions<T>;
16
+ toolConfig?: FieldsConfig<AxButtonOptions>;
17
+ onScroll?: ((...args: T[]) => any) | undefined;
18
+ onSelect?: ((...args: T[]) => any) | undefined;
19
+ "onExpand-change"?: ((...args: T[]) => any) | undefined;
20
+ "onCurrent-change"?: ((...args: T[]) => any) | undefined;
21
+ "onSelect-all"?: ((...args: T[]) => any) | undefined;
22
+ "onSelection-change"?: ((...args: T[]) => any) | undefined;
23
+ "onCell-mouse-enter"?: ((...args: T[]) => any) | undefined;
24
+ "onCell-mouse-leave"?: ((...args: T[]) => any) | undefined;
25
+ "onCell-contextmenu"?: ((...args: T[]) => any) | undefined;
26
+ "onCell-click"?: ((...args: T[]) => any) | undefined;
27
+ "onCell-dblclick"?: ((...args: T[]) => any) | undefined;
28
+ "onRow-click"?: ((...args: T[]) => any) | undefined;
29
+ "onRow-contextmenu"?: ((...args: T[]) => any) | undefined;
30
+ "onRow-dblclick"?: ((...args: T[]) => any) | undefined;
31
+ "onHeader-click"?: ((...args: T[]) => any) | undefined;
32
+ "onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
33
+ "onSort-change"?: ((...args: T[]) => any) | undefined;
34
+ "onFilter-change"?: ((...args: T[]) => any) | undefined;
35
+ "onHeader-dragend"?: ((...args: T[]) => any) | undefined;
36
+ };
@@ -0,0 +1,39 @@
1
+ import { TableInstance } from 'element-plus';
2
+ import { AxTableProps } from '../..';
3
+ import { PageData } from '../../../../utils';
4
+ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<AxTableProps<T>> & (typeof globalThis extends {
6
+ __VLS_PROPS_FALLBACK: infer P;
7
+ } ? P : {});
8
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
9
+ getElTable: () => TableInstance | undefined;
10
+ setConfig: import('../../../../hooks').StateApi<import('../../../../hooks').FetchOptions<any, PageData<T> | T[]>>;
11
+ setApi: import('../../../../hooks').StateApi<import('../../../../hooks').RequestFetch<any, PageData<T> | T[]>>;
12
+ load: (params?: any) => Promise<any>;
13
+ getConfig: () => import('../../../../hooks').FetchOptions<any, PageData<T> | T[]>;
14
+ get: () => any;
15
+ getReady: () => boolean;
16
+ setParams: (data: any, load?: boolean) => void;
17
+ reload: () => void;
18
+ }>) => void;
19
+ attrs: any;
20
+ slots: {
21
+ search?: (props: {}) => any;
22
+ } & {
23
+ tool?: (props: {}) => any;
24
+ } & {
25
+ default?: (props: {}) => any;
26
+ } & {
27
+ footer?: (props: {}) => any;
28
+ };
29
+ emit: {};
30
+ }>) => import('vue').VNode & {
31
+ __ctx?: Awaited<typeof __VLS_setup>;
32
+ };
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
36
+ [K in keyof T]: T[K];
37
+ } : {
38
+ [K in keyof T as K]: T[K];
39
+ }) & {};
@@ -0,0 +1,3 @@
1
+ export * from './props';
2
+ export declare const AxTableColumn: import('vue').DefineComponent<import('./props').AxTableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./props').AxTableColumnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ export default AxTableColumn;
@@ -0,0 +1,3 @@
1
+ import { TableColumnCtx } from 'element-plus';
2
+ export interface AxTableColumnProps extends Partial<TableColumnCtx> {
3
+ }
@@ -0,0 +1,4 @@
1
+ import { AxTableColumnProps } from './props';
2
+ declare const __VLS_export: import('vue').DefineComponent<AxTableColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxTableColumnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { default as tablePage } from './table-page.vue';
2
+ export * from './props';
3
+ export declare const AxTablePage: import('vue').DefineComponent<import('./props').AxTablePageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./props').AxTablePageProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ export default AxTablePage;
5
+ export type AxTablePageInstance = InstanceType<typeof tablePage>;
@@ -0,0 +1,5 @@
1
+ import { PaginationProps } from 'element-plus';
2
+ export interface AxTablePageProps extends Partial<PaginationProps> {
3
+ parmaNo?: string;
4
+ parmaSize?: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { AxTablePageProps } from './props';
2
+ declare const __VLS_export: import('vue').DefineComponent<AxTablePageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AxTablePageProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,69 @@
1
+ import { default as tableSelect } from './table-select.vue';
2
+ import { ComponentExposed } from 'vue-component-type-helpers';
3
+ export * from './props';
4
+ export declare const AxTableSelect: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
5
+ attrs: any;
6
+ emit: ((evt: "reset") => void) & ((evt: "search", data: T) => void) & ((evt: "change", data: T) => void);
7
+ slots: {
8
+ default?: (props: {}) => any;
9
+ } & {
10
+ buttons?: (props: {}) => any;
11
+ };
12
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
13
+ props: import('vue').PublicProps & {
14
+ isReset?: boolean | undefined;
15
+ resetButton?: import('../../..').AxButtonProps | undefined;
16
+ over?: number | undefined;
17
+ isDefault?: boolean | undefined;
18
+ submitButton?: import('../../..').AxButtonProps | undefined;
19
+ loading?: boolean | undefined;
20
+ size?: import('element-plus').ComponentSize | undefined;
21
+ disabled?: boolean | undefined;
22
+ rules?: import('element-plus').FormRules | undefined;
23
+ labelPosition?: "left" | "right" | "top" | undefined;
24
+ requireAsteriskPosition?: "left" | "right" | undefined;
25
+ labelWidth?: string | number | undefined;
26
+ labelSuffix?: string | undefined;
27
+ inline?: boolean | undefined;
28
+ inlineMessage?: boolean | undefined;
29
+ statusIcon?: boolean | undefined;
30
+ showMessage?: boolean | undefined;
31
+ validateOnRuleChange?: boolean | undefined;
32
+ hideRequiredAsterisk?: boolean | undefined;
33
+ scrollToError?: boolean | undefined;
34
+ scrollIntoViewOptions?: (ScrollIntoViewOptions | boolean) | undefined;
35
+ onReset?: (() => any) | undefined;
36
+ onSearch?: ((data: T) => any) | undefined;
37
+ onChange?: ((data: T) => any) | undefined;
38
+ } & (typeof globalThis extends {
39
+ __VLS_PROPS_FALLBACK: infer P;
40
+ } ? P : {});
41
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
42
+ setConfig: import('../../../..').StateApi<import('../../../..').FetchOptions<T, any[] | import('../../../..').PageData<any>>>;
43
+ setApi: import('../../../..').StateApi<import('../../../..').RequestFetch<T, any[] | import('../../../..').PageData<any>>>;
44
+ load: (params?: T | undefined) => Promise<any>;
45
+ getConfig: () => import('../../../..').FetchOptions<T, any[] | import('../../../..').PageData<any>>;
46
+ get: () => any;
47
+ getReady: () => boolean;
48
+ setParams: (data: T, load?: boolean) => void;
49
+ reload: () => void;
50
+ getValues: () => T;
51
+ getFlForm: () => import('element-plus').FormInstance | undefined;
52
+ getFields: () => (keyof T)[];
53
+ getDefaultValues: () => {} & Record<string, any>;
54
+ setValues: (data: Partial<T>) => void;
55
+ resetValues: () => void;
56
+ clearValues: () => void;
57
+ }>) => void;
58
+ attrs: any;
59
+ slots: {
60
+ default?: (props: {}) => any;
61
+ } & {
62
+ buttons?: (props: {}) => any;
63
+ };
64
+ emit: ((evt: "reset") => void) & ((evt: "search", data: T) => void) & ((evt: "change", data: T) => void);
65
+ }>) => import('vue').VNode & {
66
+ __ctx?: Awaited<typeof __VLS_setup>;
67
+ };
68
+ export default AxTableSelect;
69
+ export type AxTableSelectInstance = ComponentExposed<typeof tableSelect>;
@@ -0,0 +1,18 @@
1
+ import { AxFormItemOptions, AxFormProps } from '../../../form';
2
+ import { AxButtonOptions, AxButtonProps } from '../../../button';
3
+ import { EmitsToProps } from '../../../../utils';
4
+ import { FieldsConfig } from '../../../../hooks/common/useComponentPool.ts';
5
+ export interface AxTableSelectProps extends AxFormProps {
6
+ isReset?: boolean;
7
+ resetButton?: AxButtonProps;
8
+ over?: number;
9
+ }
10
+ export interface AxTableSelectEmits<T> {
11
+ search: [data: T];
12
+ change: [data: T];
13
+ reset: [];
14
+ }
15
+ export interface AxTableSelectOptions<T extends Record<string, any>> extends EmitsToProps<AxTableSelectEmits<T>>, AxTableSelectProps {
16
+ fieldsConfig?: FieldsConfig<AxFormItemOptions<T>>;
17
+ buttonsConfig?: FieldsConfig<AxButtonOptions>;
18
+ }
@@ -0,0 +1,44 @@
1
+ import { AxTableSelectProps } from './props';
2
+ import { PageData } from '../../../../utils';
3
+ declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<AxTableSelectProps & {
5
+ onReset?: (() => any) | undefined;
6
+ onSearch?: ((data: T) => any) | undefined;
7
+ onChange?: ((data: T) => any) | undefined;
8
+ }> & (typeof globalThis extends {
9
+ __VLS_PROPS_FALLBACK: infer P;
10
+ } ? P : {});
11
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
12
+ setConfig: import('../../../../hooks').StateApi<import('../../../../hooks').FetchOptions<T, any[] | PageData<any>>>;
13
+ setApi: import('../../../../hooks').StateApi<import('../../../../hooks').RequestFetch<T, any[] | PageData<any>>>;
14
+ load: (params?: T | undefined) => Promise<any>;
15
+ getConfig: () => import('../../../../hooks').FetchOptions<T, any[] | PageData<any>>;
16
+ get: () => any;
17
+ getReady: () => boolean;
18
+ setParams: (data: T, load?: boolean) => void;
19
+ reload: () => void;
20
+ getValues: () => T;
21
+ getFlForm: () => import('element-plus').FormInstance | undefined;
22
+ getFields: () => (keyof T)[];
23
+ getDefaultValues: () => {} & Record<string, any>;
24
+ setValues: (data: Partial<T>) => void;
25
+ resetValues: () => void;
26
+ clearValues: () => void;
27
+ }>) => void;
28
+ attrs: any;
29
+ slots: {
30
+ default?: (props: {}) => any;
31
+ } & {
32
+ buttons?: (props: {}) => any;
33
+ };
34
+ emit: ((evt: "reset") => void) & ((evt: "search", data: T) => void) & ((evt: "change", data: T) => void);
35
+ }>) => import('vue').VNode & {
36
+ __ctx?: Awaited<typeof __VLS_setup>;
37
+ };
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
41
+ [K in keyof T]: T[K];
42
+ } : {
43
+ [K in keyof T as K]: T[K];
44
+ }) & {};
@@ -0,0 +1,4 @@
1
+ export * from './components/table';
2
+ export * from './components/table-page';
3
+ export * from './components/table-select';
4
+ export * from './components/table-column';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const bus: import('mitt').Emitter<Record<import('mitt').EventType, unknown>>;
@@ -0,0 +1,5 @@
1
+ export * from './bus';
2
+ export * from './type';
3
+ export * from './object';
4
+ export * from './ui';
5
+ export * from './request';
@@ -0,0 +1,16 @@
1
+ import { DeepPartial } from 'ts-essentials';
2
+ /**
3
+ * 深度合并两个对象的值,不同的值会追加,不会覆盖
4
+ * @template T 状态数据的类型
5
+ * @Param {T} object -需要被合并的对象
6
+ * @Param {DeepPartial<T>} source - 追加合并的对象
7
+ * @param bool
8
+ * @returns T}返回一个新的对象
9
+ * */
10
+ export declare const mergeDeep: <T>(object: T, source: DeepPartial<T> | T, bool?: boolean) => T;
11
+ /**
12
+ *判断是否是一个标准的{key:value}对象
13
+ * @Param {any} obj - 接收的值
14
+ * @returns {boolean} 如果不是返回false,否则返回true
15
+ */
16
+ export declare const isObject: (obj: any) => boolean;
@@ -0,0 +1,12 @@
1
+ import { AxiosError, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
2
+ interface Interceptors {
3
+ requestSuccess: ((config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig)[];
4
+ requestError: ((error: AxiosError) => AxiosError)[];
5
+ responseSuccess: ((response: AxiosResponse) => AxiosResponse)[];
6
+ responseError: ((error: AxiosError) => AxiosError)[];
7
+ }
8
+ type InterceptorType<T extends keyof Interceptors> = Interceptors[T][number];
9
+ export declare const get: <T>(url: string, params?: Record<string, any>, config?: AxiosRequestConfig) => Promise<T>;
10
+ export declare const post: <T>(url: string, params?: Record<string, any>, config?: AxiosRequestConfig) => Promise<T>;
11
+ export declare const addInterceptors: <K extends keyof Interceptors>(type: K, interceptor: InterceptorType<K>) => void;
12
+ export {};