@gx-design-vue/pro-table 0.2.0-beta.9 → 0.2.0-beta.90

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 (40) hide show
  1. package/dist/ProTable.d.ts +195 -793
  2. package/dist/_utils/ant-design-vue/index.d.ts +2 -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/dateFormat.d.ts +20 -0
  10. package/dist/components/Form/index.d.ts +15 -14
  11. package/dist/components/Form/style.d.ts +2 -5
  12. package/dist/components/ListToolBar/index.d.ts +18 -18
  13. package/dist/components/ListToolBar/style.d.ts +2 -5
  14. package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
  15. package/dist/components/ToolBar/index.d.ts +18 -18
  16. package/dist/context/TableContext.d.ts +10 -11
  17. package/dist/hooks/useColums.d.ts +88 -7
  18. package/dist/hooks/useFetchData.d.ts +18 -15
  19. package/dist/hooks/useLoading.d.ts +5 -4
  20. package/dist/hooks/usePagination.d.ts +8 -3
  21. package/dist/hooks/useRowSelection.d.ts +10 -7
  22. package/dist/hooks/useTable.d.ts +38 -11
  23. package/dist/hooks/useTableForm.d.ts +8 -8
  24. package/dist/hooks/useTableScroll.d.ts +7 -7
  25. package/dist/hooks/useTableSize.d.ts +1 -1
  26. package/dist/index.d.ts +6 -5
  27. package/dist/pro-table.js +2706 -0
  28. package/dist/pro-table.umd.cjs +1 -0
  29. package/dist/props.d.ts +72 -358
  30. package/dist/style.d.ts +2 -6
  31. package/dist/types/ColumnTypings.d.ts +22 -12
  32. package/dist/types/SlotsTypings.d.ts +42 -8
  33. package/dist/types/TableTypings.d.ts +97 -59
  34. package/dist/typing.d.ts +1 -1
  35. package/dist/utils/utils.d.ts +4 -1
  36. package/package.json +20 -43
  37. package/volar.d.ts +3 -3
  38. package/dist/pro-table.mjs +0 -35090
  39. package/dist/pro-table.umd.js +0 -364
  40. package/dist/utils/config.d.ts +0 -1
@@ -2,3 +2,5 @@ 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';
6
+ export * from './tooltip/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: undefined;
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>;
@@ -0,0 +1,20 @@
1
+ type FormatType = ((dayjs: any) => string) | string | undefined;
2
+ /**
3
+ * 通过 format 来格式化日期,因为支持了function 所以需要单独的方法来处理
4
+ * @param {any} endText
5
+ * @param {FormatType} format
6
+ * @return string
7
+ */
8
+ export declare function formatString(endText: any, format: FormatType): string;
9
+ export declare function valueFormater(valueFormat?: string, showTime?: any): string;
10
+ /**
11
+ * 格式化区域日期,如果是一个数组,会返回 start ~ end 数组
12
+ * @param {any} value
13
+ * @param {FormatType | FormatType[]} format
14
+ * returns string[] | Dayjs[]
15
+ */
16
+ export declare const dateArrayFormatter: (value: any[], format: FormatType | FormatType[] | {
17
+ format: string;
18
+ type?: "mask";
19
+ }, type?: "dayjs" | "string") => any | undefined;
20
+ export {};
@@ -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,97 @@ 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
+ tooltip?: false | (Partial<import("vue").ExtractPropTypes<{
24
+ title: import("vue-types").VueTypeValidableDef<any>;
25
+ trigger: import("vue").PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
26
+ open: {
27
+ type: BooleanConstructor;
28
+ default: any;
29
+ };
30
+ visible: {
31
+ type: BooleanConstructor;
32
+ default: any;
33
+ };
34
+ placement: import("vue").PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
35
+ color: import("vue").PropType<import("ant-design-vue/es/_util/type").LiteralUnion<import("ant-design-vue/es/_util/colors").PresetColorType>>;
36
+ transitionName: StringConstructor;
37
+ overlayStyle: {
38
+ type: import("vue").PropType<import("vue").CSSProperties>;
39
+ default: import("vue").CSSProperties;
40
+ };
41
+ overlayInnerStyle: {
42
+ type: import("vue").PropType<import("vue").CSSProperties>;
43
+ default: import("vue").CSSProperties;
44
+ };
45
+ overlayClassName: StringConstructor;
46
+ openClassName: StringConstructor;
47
+ prefixCls: StringConstructor;
48
+ mouseEnterDelay: NumberConstructor;
49
+ mouseLeaveDelay: NumberConstructor;
50
+ getPopupContainer: import("vue").PropType<(triggerNode: HTMLElement) => HTMLElement>;
51
+ arrowPointAtCenter: {
52
+ type: BooleanConstructor;
53
+ default: any;
54
+ };
55
+ arrow: {
56
+ type: import("vue").PropType<boolean | {
57
+ pointAtCenter?: boolean;
58
+ }>;
59
+ default: boolean | {
60
+ pointAtCenter?: boolean;
61
+ };
62
+ };
63
+ autoAdjustOverflow: {
64
+ type: import("vue").PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
65
+ default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
66
+ };
67
+ destroyTooltipOnHide: {
68
+ type: BooleanConstructor;
69
+ default: any;
70
+ };
71
+ align: {
72
+ type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
73
+ default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
74
+ };
75
+ builtinPlacements: {
76
+ type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
77
+ default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
78
+ };
79
+ children: ArrayConstructor;
80
+ onVisibleChange: import("vue").PropType<(vis: boolean) => void>;
81
+ 'onUpdate:visible': import("vue").PropType<(vis: boolean) => void>;
82
+ onOpenChange: import("vue").PropType<(vis: boolean) => void>;
83
+ 'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
84
+ }>> & {
85
+ width?: number;
86
+ targetStyle?: Partial<CSSStyleDeclaration>;
87
+ hiddenLine?: number;
88
+ class?: string;
89
+ }) | undefined;
90
+ show?: boolean;
91
+ key?: string | undefined;
92
+ dataIndex?: string | undefined;
93
+ order?: number;
94
+ hideInSetting?: boolean;
95
+ searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
96
+ copyable?: boolean;
97
+ columnEmptyText?: string;
98
+ valueType?: import("../types/ColumnTypings").ProColumnsValueType;
99
+ })[]>;
100
+ cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
101
+ setColumns: (columnList: ProColumnsType) => void;
21
102
  changeColumns: (columnState: Record<string, ColumnsState>) => void;
22
- resizeColumnWidth: (w: number, col: ProColumnType) => void;
103
+ resizeColumnWidth: (width: number, col: ProColumnType) => void;
23
104
  };
24
105
  export {};
@@ -1,38 +1,41 @@
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
+ search: Ref<ProTableProps['search']>;
9
+ paginationInfo: Ref<ProTablePagination>;
9
10
  setPagination: (info: Partial<ProTablePagination>) => void;
10
11
  setLoading: (loading: boolean) => void;
11
12
  setColumns: (columnList: ProColumnsType) => void;
12
13
  removeRowKeys: (keyList: (string | number)[]) => void;
13
14
  syncSelectedRows: (dataList: any[]) => void;
14
15
  columns: ComputedRef<ProColumnsType>;
15
- formParamsRef: RecordType;
16
+ formParamsRef: DefaultRecordType;
16
17
  onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
18
+ hasCustomRender: ComputedRef<boolean>;
17
19
  }
18
20
  export type ConfigFetchData = {
19
21
  polling: ComputedRef<ProTableProps['polling']>;
20
- request: ComputedRef<ProTableProps['request']>;
21
- postData: ComputedRef<ProTableProps['postData']>;
22
+ request: ProTableProps['request'];
23
+ postData: ProTableProps['postData'];
22
24
  waitRequest: Ref<ProTableProps['waitRequest']>;
23
25
  debounceTime: ComputedRef<ProTableProps['debounceTime']>;
24
26
  dataSource: ComputedRef<ProTableProps['dataSource']>;
25
27
  };
26
28
  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[]>;
29
+ export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { search, columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
30
+ dataSource: ComputedRef<DefaultRecordType[]>;
29
31
  isTreeDataRef: ComputedRef<boolean>;
30
- reSetDataList: (list: RecordType[]) => void;
31
- changeDataValue: ({ key, params }: {
32
- key?: string | undefined;
33
- params: RecordType;
32
+ reSetDataList: (list: DefaultRecordType[]) => void;
33
+ changeDataValue: <T = DefaultRecordType>({ key, record, type }: {
34
+ record: T;
35
+ type: "update" | "push" | "delete" | "unshift";
36
+ key?: keyof T;
34
37
  }) => void;
35
- handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, any[] | null>, sorter: TableSorter) => void;
38
+ handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
36
39
  reload: (info?: ProTabelFeachParams) => Promise<void>;
37
40
  };
38
41
  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
+ selectedKeys: Ref<Key[], Key[]>;
7
+ selectedItems: 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
  };