@gx-design-vue/pro-table 0.2.0-beta.8 → 0.2.0-beta.81

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 (39) hide show
  1. package/dist/ProTable.d.ts +193 -791
  2. package/dist/_utils/ant-design-vue/index.d.ts +1 -0
  3. package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
  4. package/dist/_utils/ant-design-vue/table/props.d.ts +33 -2
  5. package/dist/_utils/ant-design-vue/table/typings.d.ts +6 -5
  6. package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
  7. package/dist/components/ColumnSetting/index.d.ts +14 -14
  8. package/dist/components/ColumnSetting/style.d.ts +2 -5
  9. package/dist/components/Form/index.d.ts +15 -14
  10. package/dist/components/Form/style.d.ts +2 -5
  11. package/dist/components/ListToolBar/index.d.ts +18 -18
  12. package/dist/components/ListToolBar/style.d.ts +2 -5
  13. package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
  14. package/dist/components/ToolBar/index.d.ts +18 -18
  15. package/dist/context/TableContext.d.ts +10 -11
  16. package/dist/hooks/useColums.d.ts +21 -7
  17. package/dist/hooks/useFetchData.d.ts +17 -15
  18. package/dist/hooks/useLoading.d.ts +5 -4
  19. package/dist/hooks/usePagination.d.ts +8 -3
  20. package/dist/hooks/useRowSelection.d.ts +10 -7
  21. package/dist/hooks/useTable.d.ts +38 -11
  22. package/dist/hooks/useTableForm.d.ts +8 -7
  23. package/dist/hooks/useTableScroll.d.ts +7 -7
  24. package/dist/hooks/useTableSize.d.ts +1 -1
  25. package/dist/index.d.ts +6 -5
  26. package/dist/pro-table.js +2662 -0
  27. package/dist/pro-table.umd.cjs +1 -0
  28. package/dist/props.d.ts +71 -357
  29. package/dist/style.d.ts +2 -6
  30. package/dist/types/ColumnTypings.d.ts +15 -11
  31. package/dist/types/SlotsTypings.d.ts +42 -8
  32. package/dist/types/TableTypings.d.ts +93 -57
  33. package/dist/typing.d.ts +1 -1
  34. package/dist/utils/utils.d.ts +4 -1
  35. package/package.json +20 -43
  36. package/volar.d.ts +3 -3
  37. package/dist/pro-table.mjs +0 -35090
  38. package/dist/pro-table.umd.js +0 -364
  39. package/dist/utils/config.d.ts +0 -1
@@ -2,3 +2,4 @@ export * from './spin/typings';
2
2
  export * from './pagination/typings';
3
3
  export * from './table/typings';
4
4
  export * from './table/props';
5
+ export * from './input/typings';
@@ -0,0 +1 @@
1
+ export type { ChangeEvent } from 'ant-design-vue/es/_util/EventInterface';
@@ -1,2 +1,33 @@
1
- import { tableProps } from 'ant-design-vue/es/table';
2
- export { tableProps };
1
+ import type { PropType } from 'vue';
2
+ import type { RcTableProps, TableProps } from './typings';
3
+ import type { SpinProps } from '../spin/typings';
4
+ declare const omitProps: (keyof TableProps)[];
5
+ export type AntTableProps = Omit<TableProps, typeof omitProps[number]>;
6
+ export declare const tableProps: {
7
+ transformCellText: PropType<TableProps["transformCellText"]>;
8
+ /**
9
+ * @Author gx12358
10
+ * @DateTime 2022/2/8
11
+ * @lastTime 2022/2/8
12
+ * @description 是否展示外边框和列边框
13
+ */
14
+ bordered: {
15
+ type: PropType<TableProps["bordered"]>;
16
+ default: boolean;
17
+ };
18
+ loading: {
19
+ type: PropType<boolean | SpinProps>;
20
+ default: undefined;
21
+ };
22
+ scroll: {
23
+ type: PropType<RcTableProps["scroll"] & {
24
+ scrollToFirstRowOnChange?: boolean;
25
+ }>;
26
+ default: undefined;
27
+ };
28
+ 'onUpdate:expandedRowKeys': {
29
+ type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
30
+ default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
31
+ };
32
+ };
33
+ export {};
@@ -1,9 +1,10 @@
1
- import type { TableProps, ColumnType } from 'ant-design-vue/es/table';
2
- import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interface';
1
+ import type { ColumnType, TableProps } from 'ant-design-vue/es/table';
2
+ import type { ColumnsType, FilterValue, GetPopupContainer, SortOrder, SorterResult, TableCurrentDataSource, TableLocale } from 'ant-design-vue/es/table/interface';
3
3
  import type { RecordType } from '@gx-design-vue/pro-utils';
4
- export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
5
- export type { Key } from 'ant-design-vue/es/vc-table/interface';
4
+ import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
5
+ export type { TablePaginationConfig, TableRowSelection, SelectionSelectFn } from 'ant-design-vue/es/table/interface';
6
+ export type { Key, RenderExpandIconProps, DataIndex } from 'ant-design-vue/es/vc-table/interface';
6
7
  export type TableFilters = Record<string, FilterValue | null>;
7
8
  export type TableSorterRecord = SorterResult<RecordType>;
8
9
  export type TableSorter = TableSorterRecord | TableSorterRecord[];
9
- export type { TableProps, ColumnType, FilterValue, SorterResult };
10
+ export type { TableProps, ColumnType, FilterValue, SorterResult, ColumnsType, TableLocale, TableCurrentDataSource, GetPopupContainer, RcTableProps, SortOrder };
@@ -0,0 +1 @@
1
+ export type { TooltipProps } from 'ant-design-vue/es/tooltip';
@@ -1,35 +1,35 @@
1
1
  import type { PropType } from 'vue';
2
- import type { SettingExtraRender } from '../../types/SlotsTypings';
2
+ import type { DefaultRender } from '../../types/SlotsTypings';
3
3
  export type ColumnSettingProps = {
4
4
  draggable?: boolean;
5
5
  checkable?: boolean;
6
- extra?: SettingExtraRender;
6
+ extra?: DefaultRender;
7
7
  checkedReset?: boolean;
8
8
  };
9
- declare const ColumnSetting: import("vue").DefineComponent<{
9
+ declare const ColumnSetting: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
10
  draggable: {
11
- type: PropType<boolean | undefined>;
11
+ type: PropType<ColumnSettingProps["draggable"]>;
12
12
  default: undefined;
13
13
  };
14
14
  checkable: {
15
- type: PropType<boolean | undefined>;
15
+ type: PropType<ColumnSettingProps["checkable"]>;
16
16
  default: undefined;
17
17
  };
18
- checkedReset: PropType<boolean | undefined>;
19
- extra: PropType<SettingExtraRender>;
20
- }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
+ checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
19
+ extra: PropType<ColumnSettingProps["extra"]>;
20
+ }>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
21
  draggable: {
22
- type: PropType<boolean | undefined>;
22
+ type: PropType<ColumnSettingProps["draggable"]>;
23
23
  default: undefined;
24
24
  };
25
25
  checkable: {
26
- type: PropType<boolean | undefined>;
26
+ type: PropType<ColumnSettingProps["checkable"]>;
27
27
  default: undefined;
28
28
  };
29
- checkedReset: PropType<boolean | undefined>;
30
- extra: PropType<SettingExtraRender>;
31
- }>>, {
29
+ checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
30
+ extra: PropType<ColumnSettingProps["extra"]>;
31
+ }>> & Readonly<{}>, {
32
32
  checkable: boolean | undefined;
33
33
  draggable: boolean | undefined;
34
- }>;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
35
  export default ColumnSetting;
@@ -1,6 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
1
2
  import type { ProAliasToken } from '@gx-design-vue/pro-provider';
2
- export interface ProToken extends ProAliasToken {
3
- componentCls: string;
4
- }
5
- declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
6
- export default _default;
3
+ export declare const genColumnSettingStyle: GenerateStyle<ProAliasToken>;
@@ -1,36 +1,37 @@
1
1
  import type { PropType } from 'vue';
2
- import type { RecordType } from '@gx-design-vue/pro-utils';
2
+ import { RecordType } from '@gx-design-vue/pro-utils';
3
+ import type { SearchConfig } from '../../types/TableTypings';
3
4
  import type { ProSearchMap } from '../../types/ColumnTypings';
4
- declare const ProTableForm: import("vue").DefineComponent<{
5
+ declare const ProTableForm: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
6
  search: {
6
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
7
- default: () => import("../../types/TableTypings").SearchConfig;
7
+ type: PropType<SearchConfig>;
8
+ default: () => SearchConfig;
8
9
  };
9
10
  modal: PropType<boolean | undefined>;
10
11
  searchMap: {
11
- type: PropType<ProSearchMap<"text">[]>;
12
+ type: PropType<ProSearchMap[]>;
12
13
  default: () => never[];
13
14
  };
14
15
  loading: PropType<boolean>;
15
16
  prefixCls: PropType<string>;
16
17
  defaultParams: PropType<RecordType>;
17
- }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
+ }>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
19
  search: {
19
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
20
- default: () => import("../../types/TableTypings").SearchConfig;
20
+ type: PropType<SearchConfig>;
21
+ default: () => SearchConfig;
21
22
  };
22
23
  modal: PropType<boolean | undefined>;
23
24
  searchMap: {
24
- type: PropType<ProSearchMap<"text">[]>;
25
+ type: PropType<ProSearchMap[]>;
25
26
  default: () => never[];
26
27
  };
27
28
  loading: PropType<boolean>;
28
29
  prefixCls: PropType<string>;
29
30
  defaultParams: PropType<RecordType>;
30
- }>> & {
31
+ }>> & Readonly<{
31
32
  onSearch?: ((...args: any[]) => any) | undefined;
32
- }, {
33
- search: import("../../types/TableTypings").SearchConfig | undefined;
34
- searchMap: ProSearchMap<"text">[];
35
- }>;
33
+ }>, {
34
+ search: SearchConfig;
35
+ searchMap: ProSearchMap[];
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
37
  export default ProTableForm;
@@ -1,6 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
1
2
  import type { ProAliasToken } from '@gx-design-vue/pro-provider';
2
- export interface ProToken extends ProAliasToken {
3
- componentCls: string;
4
- }
5
- declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
6
- export default _default;
3
+ export declare const genTableFormStyle: GenerateStyle<ProAliasToken>;
@@ -6,57 +6,57 @@ export type ListToolBarSetting = {
6
6
  key?: string;
7
7
  onClick?: (key?: string) => void;
8
8
  };
9
- declare const ListToolBar: import("vue").DefineComponent<{
9
+ declare const ListToolBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
10
  actions: {
11
- type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
11
+ type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
12
12
  default: () => undefined;
13
13
  };
14
14
  settings: PropType<VueNode[]>;
15
15
  titleTip: {
16
- type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
16
+ type: PropType<import("../..").ProTableProps["titleTip"]>;
17
17
  default: () => undefined;
18
18
  };
19
19
  prefixCls: StringConstructor;
20
20
  headerTitle: {
21
- type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
21
+ type: PropType<import("../..").ProTableProps["headerTitle"]>;
22
22
  default: () => undefined;
23
23
  };
24
24
  titleTipText: {
25
- type: PropType<string | undefined>;
25
+ type: PropType<import("../..").ProTableProps["titleTipText"]>;
26
26
  default: string;
27
27
  };
28
28
  optionsExtra: {
29
- type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
29
+ type: PropType<import("../..").ProTableProps["optionsExtra"]>;
30
30
  default: () => undefined;
31
31
  };
32
- }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
32
+ }>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
33
  actions: {
34
- type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
34
+ type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
35
35
  default: () => undefined;
36
36
  };
37
37
  settings: PropType<VueNode[]>;
38
38
  titleTip: {
39
- type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
39
+ type: PropType<import("../..").ProTableProps["titleTip"]>;
40
40
  default: () => undefined;
41
41
  };
42
42
  prefixCls: StringConstructor;
43
43
  headerTitle: {
44
- type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
44
+ type: PropType<import("../..").ProTableProps["headerTitle"]>;
45
45
  default: () => undefined;
46
46
  };
47
47
  titleTipText: {
48
- type: PropType<string | undefined>;
48
+ type: PropType<import("../..").ProTableProps["titleTipText"]>;
49
49
  default: string;
50
50
  };
51
51
  optionsExtra: {
52
- type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
52
+ type: PropType<import("../..").ProTableProps["optionsExtra"]>;
53
53
  default: () => undefined;
54
54
  };
55
- }>>, {
55
+ }>> & Readonly<{}>, {
56
+ headerTitle: import("../../types/SlotsTypings").DefaultRender;
57
+ titleTip: import("../../types/SlotsTypings").DefaultRender;
58
+ optionsExtra: import("../../types/SlotsTypings").DefaultRender;
56
59
  titleTipText: string | undefined;
57
- titleTip: import("../../types/SlotsTypings").TitleTipRender;
58
- headerTitle: import("../../types/SlotsTypings").HeaderTitleRender;
59
- optionsExtra: import("../../types/SlotsTypings").OptionsExtraRender;
60
- actions: import("../../types/SlotsTypings").ToolBarBtnRender;
61
- }>;
60
+ actions: import("../../types/SlotsTypings").DefaultRender;
61
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
62
  export default ListToolBar;
@@ -1,6 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
1
2
  import type { ProAliasToken } from '@gx-design-vue/pro-provider';
2
- export interface ProToken extends ProAliasToken {
3
- componentCls: string;
4
- }
5
- declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
6
- export default _default;
3
+ export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
@@ -1,3 +1,2 @@
1
- import type { FunctionalComponent as FC } from 'vue';
2
- declare const FullScreenIcon: FC;
1
+ declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
2
  export default FullScreenIcon;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { ProTableProps, OptionConfig } from '../../types/TableTypings';
2
+ import type { OptionConfig, ProTableProps } from '../../types/TableTypings';
3
3
  export type OptionsFunctionType = () => void;
4
4
  export type ToolBarProps = {
5
5
  headerTitle?: ProTableProps['headerTitle'];
@@ -10,21 +10,21 @@ export type ToolBarProps = {
10
10
  settingExtra?: ProTableProps['settingExtra'];
11
11
  options?: OptionConfig | boolean;
12
12
  };
13
- declare const ToolbarRender: import("vue").DefineComponent<{
14
- options: PropType<boolean | OptionConfig | undefined>;
15
- titleTip: PropType<import("../../types/SlotsTypings").TitleTipRender>;
16
- settingExtra: PropType<import("../../types/SlotsTypings").SettingExtraRender>;
17
- optionsExtra: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
18
- titleTipText: PropType<string | undefined>;
19
- toolBarBtn: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
20
- headerTitle: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
21
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
- options: PropType<boolean | OptionConfig | undefined>;
23
- titleTip: PropType<import("../../types/SlotsTypings").TitleTipRender>;
24
- settingExtra: PropType<import("../../types/SlotsTypings").SettingExtraRender>;
25
- optionsExtra: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
26
- titleTipText: PropType<string | undefined>;
27
- toolBarBtn: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
28
- headerTitle: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
29
- }>>, {}>;
13
+ declare const ToolbarRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
+ options: PropType<ProTableProps["options"]>;
15
+ titleTip: PropType<ProTableProps["titleTip"]>;
16
+ settingExtra: PropType<ProTableProps["settingExtra"]>;
17
+ optionsExtra: PropType<ProTableProps["optionsExtra"]>;
18
+ titleTipText: PropType<ProTableProps["titleTipText"]>;
19
+ toolBarBtn: PropType<ProTableProps["toolBarBtn"]>;
20
+ headerTitle: PropType<ProTableProps["headerTitle"]>;
21
+ }>, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ options: PropType<ProTableProps["options"]>;
23
+ titleTip: PropType<ProTableProps["titleTip"]>;
24
+ settingExtra: PropType<ProTableProps["settingExtra"]>;
25
+ optionsExtra: PropType<ProTableProps["optionsExtra"]>;
26
+ titleTipText: PropType<ProTableProps["titleTipText"]>;
27
+ toolBarBtn: PropType<ProTableProps["toolBarBtn"]>;
28
+ headerTitle: PropType<ProTableProps["headerTitle"]>;
29
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
30
  export default ToolbarRender;
@@ -1,15 +1,15 @@
1
- import type { Ref, ComputedRef } from 'vue';
2
- import type { InjectionKey, Slots } from 'vue';
1
+ import type { ComputedRef, Ref } from 'vue';
3
2
  import type { SizeType } from '@gx-design-vue/pro-utils';
4
3
  import type { ProColumnsType } from '../types/ColumnTypings';
4
+ import type { Slots } from '../types/SlotsTypings';
5
5
  import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
6
6
  import type { PaginationProps } from '../_utils';
7
- export type ContextType = any;
8
- export interface TableContextProps {
9
- columns?: ComputedRef<ProColumnsType>;
10
- cacheColumns?: ComputedRef<ProColumnsType>;
11
- tableSize?: Ref<SizeType>;
12
- action?: {
7
+ export interface ProTableContextProps {
8
+ columns: ComputedRef<ProColumnsType>;
9
+ isMobile: ComputedRef<boolean>;
10
+ cacheColumns: ComputedRef<ProColumnsType>;
11
+ tableSize: Ref<SizeType>;
12
+ action: {
13
13
  /** @name 刷新 */
14
14
  reload: (info?: any) => void;
15
15
  toggle: () => Promise<void>;
@@ -21,6 +21,5 @@ export interface TableContextProps {
21
21
  changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
22
22
  [key: string]: any;
23
23
  }
24
- export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<ContextType>, defaultValue?: ContextType) => T;
25
- export declare const provideTableContext: (value: TableContextProps | ComputedRef<TableContextProps>) => void;
26
- export declare const useTableContext: () => Required<TableContextProps>;
24
+ declare const provideTableContext: (value: ProTableContextProps) => void, useTableContext: (injectDefaultValue?: ProTableContextProps | undefined) => ProTableContextProps;
25
+ export { provideTableContext, useTableContext, };
@@ -1,4 +1,4 @@
1
- import type { Ref, ComputedRef } from 'vue';
1
+ import type { ComputedRef, Ref } from 'vue';
2
2
  import type { ColumnsState } from './useColumnSetting';
3
3
  import type { ProTableProps } from '../types/TableTypings';
4
4
  import type { ProColumnType, ProColumnsType } from '../types/ColumnTypings';
@@ -9,16 +9,30 @@ export type ConfigColumns = {
9
9
  };
10
10
  type UseColumnsType = {
11
11
  scroll: ComputedRef<ProTableProps['scroll']>;
12
- breakpoint: ComputedRef<boolean>;
12
+ breakpoint: ComputedRef<boolean | undefined>;
13
13
  columns: ComputedRef<ProColumnsType>;
14
14
  } & ConfigColumns;
15
15
  export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
16
16
  export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
17
- breakpoint: ComputedRef<boolean>;
18
- getProColumns: ComputedRef<ProColumnType<import("../typing").DefaultRecordType>[]>;
19
- cacheProColumns: Ref<ProColumnsType<import("../typing").DefaultRecordType>>;
20
- setColumns: (columnList: ProColumnsType<import("../typing").DefaultRecordType>) => void;
17
+ breakpoint: ComputedRef<boolean | undefined>;
18
+ proColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("../typing").DefaultRecordType>, "key" | "dataIndex" | "width"> & {
19
+ children?: ProColumnsType<import("../typing").DefaultRecordType, import("../typing").DefaultRecordType> | undefined;
20
+ uuid?: string | number;
21
+ index?: number;
22
+ copyText?: string | ((record: ProColumnType) => string);
23
+ show?: boolean;
24
+ key?: string | undefined;
25
+ dataIndex?: string | undefined;
26
+ order?: number;
27
+ hideInSetting?: boolean;
28
+ searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
29
+ copyable?: boolean;
30
+ columnEmptyText?: string;
31
+ valueType?: import("../types/ColumnTypings").ProColumnsValueType;
32
+ })[]>;
33
+ cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
34
+ setColumns: (columnList: ProColumnsType) => void;
21
35
  changeColumns: (columnState: Record<string, ColumnsState>) => void;
22
- resizeColumnWidth: (w: number, col: ProColumnType) => void;
36
+ resizeColumnWidth: (width: number, col: ProColumnType) => void;
23
37
  };
24
38
  export {};
@@ -1,38 +1,40 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { TableSorter } from '../_utils';
3
- import type { RecordType } from '@gx-design-vue/pro-utils';
4
- import type { ProTableProps, ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
2
+ import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils/ant-design-vue/table/typings';
3
+ import type { ProTabelFeachParams, ProTablePagination, ProTablePaginationConfig, ProTableProps } from '../types/TableTypings';
4
+ import type { DefaultRecordType } from '../typing';
5
5
  import type { ProColumnsType } from '../types/ColumnTypings';
6
6
  interface ActionType {
7
- getLoading: ComputedRef<boolean | undefined>;
8
- getPaginationInfo: ComputedRef<ProTablePagination>;
7
+ loading: ComputedRef<boolean | undefined>;
8
+ paginationInfo: Ref<ProTablePagination>;
9
9
  setPagination: (info: Partial<ProTablePagination>) => void;
10
10
  setLoading: (loading: boolean) => void;
11
11
  setColumns: (columnList: ProColumnsType) => void;
12
12
  removeRowKeys: (keyList: (string | number)[]) => void;
13
13
  syncSelectedRows: (dataList: any[]) => void;
14
14
  columns: ComputedRef<ProColumnsType>;
15
- formParamsRef: RecordType;
15
+ formParamsRef: DefaultRecordType;
16
16
  onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
17
+ hasCustomRender: ComputedRef<boolean>;
17
18
  }
18
19
  export type ConfigFetchData = {
19
20
  polling: ComputedRef<ProTableProps['polling']>;
20
- request: ComputedRef<ProTableProps['request']>;
21
- postData: ComputedRef<ProTableProps['postData']>;
21
+ request: ProTableProps['request'];
22
+ postData: ProTableProps['postData'];
22
23
  waitRequest: Ref<ProTableProps['waitRequest']>;
23
24
  debounceTime: ComputedRef<ProTableProps['debounceTime']>;
24
25
  dataSource: ComputedRef<ProTableProps['dataSource']>;
25
26
  };
26
27
  export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
27
- export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
28
- getDataSourceRef: ComputedRef<RecordType[]>;
28
+ export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
29
+ dataSource: ComputedRef<DefaultRecordType[]>;
29
30
  isTreeDataRef: ComputedRef<boolean>;
30
- reSetDataList: (list: RecordType[]) => void;
31
- changeDataValue: ({ key, params }: {
32
- key?: string | undefined;
33
- params: RecordType;
31
+ reSetDataList: (list: DefaultRecordType[]) => void;
32
+ changeDataValue: <T = DefaultRecordType>({ key, record, type }: {
33
+ record: T;
34
+ type: "update" | "push" | "delete" | "unshift";
35
+ key?: keyof T;
34
36
  }) => void;
35
- handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, any[] | null>, sorter: TableSorter) => void;
37
+ handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
36
38
  reload: (info?: ProTabelFeachParams) => Promise<void>;
37
39
  };
38
40
  export {};
@@ -1,9 +1,10 @@
1
- import type { Ref } from 'vue';
1
+ import { type Ref } from 'vue';
2
2
  import type { SpinProps } from '../_utils';
3
- export declare function useLoading({ emit, loading }: {
3
+ export declare function useLoading({ emit, loading: propsLoading }: {
4
4
  loading: Ref<boolean | SpinProps | undefined>;
5
5
  emit: any;
6
6
  }): {
7
- getLoading: import("vue").ComputedRef<boolean>;
8
- setLoading: (loading: boolean) => void;
7
+ loadingComputed: import("vue").ComputedRef<boolean | undefined>;
8
+ loading: Ref<boolean | undefined, boolean | undefined>;
9
+ setLoading: (value: boolean) => void;
9
10
  };
@@ -1,10 +1,15 @@
1
- import type { Ref, Slots, ComputedRef } from 'vue';
2
- import type { ProTableProps, ProTablePagination } from '../types/TableTypings';
1
+ import type { Slots } from '../types/SlotsTypings';
2
+ import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
3
+ import type { ComputedRef, Ref } from 'vue';
3
4
  export declare function usePagination({ slots, props, pagination }: {
4
5
  slots: Slots;
5
6
  props: ComputedRef<ProTableProps>;
6
7
  pagination: Ref<ProTableProps['pagination']>;
7
8
  }): {
8
- getPaginationInfo: ComputedRef<ProTablePagination>;
9
+ paginationInfo: Ref<ProTablePagination, ProTablePagination>;
10
+ requestPagination: {
11
+ pageSize: number;
12
+ pageNum: number;
13
+ };
9
14
  setPagination: (info: Partial<ProTablePagination>) => void;
10
15
  };
@@ -1,11 +1,14 @@
1
1
  import type { Ref } from 'vue';
2
2
  import type { RecordType } from '@gx-design-vue/pro-utils';
3
- import type { ProTableProps, ProTableRowSelection } from '../types/TableTypings';
4
- export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableRowSelection | undefined>): {
5
- selectedKey: Ref<(string | number)[]>;
6
- selectRowKey: (record: RecordType, selected: any[]) => void;
7
- selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
8
- removeRowKeys: (keyList: (string | number)[]) => void;
3
+ import type { Key, SelectionSelectFn } from '../_utils';
4
+ import type { ProTableRowSelection } from '../types/TableTypings';
5
+ export declare function useRowSelection(rowKey: Ref<string>, rowSelection: Ref<ProTableRowSelection | undefined>): {
6
+ selectedKey: Ref<Key[], Key[]>;
7
+ selectedItem: Ref<RecordType[], RecordType[]>;
8
+ selectRowKey: SelectionSelectFn<RecordType>;
9
+ selectAllRowKey: (selected: boolean, selectedRows: RecordType[], changeRows: RecordType[]) => void;
10
+ removeRowKeys: (keys: (string | number)[]) => void;
9
11
  changeRowKey: () => void;
10
- syncSelectedRows: (dataList: any[]) => void;
12
+ syncSelectedRows: (dataList: RecordType[]) => void;
13
+ clearAllRowKeys: () => void;
11
14
  };
@@ -1,12 +1,39 @@
1
- import type { Ref, ComputedRef } from 'vue';
2
- import type { ProCoreActionType, ProCoreFormType, ProTableRef } from '../types/TableTypings';
3
- export declare function useTable(tableRef: Ref<ProTableRef>): {
4
- params: ComputedRef<Record<string, any>>;
5
- loading: ComputedRef<ProCoreActionType['getLoadingStatus']>;
6
- reload: ProCoreActionType['reload'];
7
- mutate: ProCoreActionType['reSetDataList'];
8
- setPage: ProCoreActionType['changePageInfo'];
9
- changeLoading: ProCoreActionType['loadingOperation'];
10
- actionRef: ComputedRef<ProCoreActionType>;
11
- formRef: ComputedRef<ProCoreFormType>;
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type { BaseTableProps } from '../props';
3
+ import type { DefaultRecordType } from '../typing';
4
+ import type { ProColumnsType, ProSearchMap } from '../types/ColumnTypings';
5
+ import type { ProCoreActionType, ProCoreFormType, ProTableProps, ProTableRef, ProTableRowSelection, RequsetConfig, RequsetFunction } from '../types/TableTypings';
6
+ export type ProTableState<T extends object = DefaultRecordType, R extends object = DefaultRecordType> = BaseTableProps & {
7
+ params: R;
8
+ columns: ProColumnsType<T, R>;
9
+ dataSource: T[];
10
+ rowSelection: ProTableRowSelection<T>;
11
+ searchMap: ProSearchMap<undefined, keyof R | keyof T>[];
12
+ rowKey?: keyof T;
13
+ postData?: (data: T[]) => any;
14
+ onReset?: (params?: Partial<R>) => void;
15
+ onReload?: (params?: Partial<R>) => void;
16
+ onSubmit?: (params?: Partial<R>) => void;
17
+ };
18
+ export type BaseTableState<T extends object = DefaultRecordType, R extends object = DefaultRecordType> = Omit<ProTableProps<T, R>, 'request'>;
19
+ export declare function useTable<T extends object = DefaultRecordType, R extends object = DefaultRecordType>(tableRef: Ref<ProTableRef<T> | undefined>, options?: {
20
+ state?: BaseTableState<T, R>;
21
+ request?: RequsetFunction<T, R>;
22
+ }): {
23
+ loading: Ref<boolean>;
24
+ dataSource: ComputedRef<T[]>;
25
+ selectedKey: ProCoreActionType<T, R>['selectedKey'];
26
+ selectedItem: ProCoreActionType<T, R>['selectedItem'];
27
+ rowsSelection: ProCoreActionType<T, R>['rowsSelection'];
28
+ requestParams: ComputedRef<RequsetConfig<R>['params']>;
29
+ reload: ProCoreActionType<T, R>['reload'];
30
+ mutate: ProCoreActionType<T, R>['reSetDataList'];
31
+ setPageAndReload: ProCoreActionType<T, R>['setPageAndReload'];
32
+ setData: ProCoreActionType<T, R>['setData'];
33
+ setPagination: ProCoreActionType<T, R>['setPagination'];
34
+ reloadAndReset: ProCoreActionType<T, R>['reloadAndReset'];
35
+ setLoading: ProCoreActionType<T, R>['setLoading'];
36
+ actionRef: ComputedRef<Partial<ProCoreActionType<T, R>>>;
37
+ formRef: ComputedRef<ProCoreFormType<R>>;
38
+ tableState: ProTableState<T, R>;
12
39
  };
@@ -1,16 +1,17 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { RecordType } from '@gx-design-vue/pro-utils';
3
- import type { ProTableProps } from '../types/TableTypings';
2
+ import type { ProTablePagination, ProTableProps } from '../types/TableTypings';
3
+ import type { DefaultRecordType } from '../typing';
4
4
  import type { ProSearchMap } from '../types/ColumnTypings';
5
5
  export declare function handleFormDefaultValue(data: ProSearchMap[]): any;
6
- export declare function useTableForm({ search, searchMap, params, columns }: {
6
+ export declare function useTableForm({ search, searchMap, params, columns, setPagination }: {
7
7
  search: Ref<ProTableProps['search']>;
8
8
  searchMap: Ref<ProTableProps['searchMap']>;
9
9
  params: Ref<ProTableProps['params']>;
10
10
  columns: ComputedRef<ProTableProps['columns']>;
11
+ setPagination: (info: Partial<ProTablePagination>) => void;
11
12
  }): {
12
- formDataRef: Ref<ProSearchMap<"text">[]>;
13
- formParamsRef: RecordType;
14
- defaultParamsRef: RecordType;
15
- setFormParams: (params: any) => void;
13
+ formDataRef: Ref<ProSearchMap[], ProSearchMap[]>;
14
+ formParamsRef: DefaultRecordType;
15
+ defaultParamsRef: DefaultRecordType;
16
+ setFormParams: (params: DefaultRecordType) => void;
16
17
  };