@gx-design-vue/pro-table 0.2.0-beta.14 → 0.2.0-beta.141

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 (59) hide show
  1. package/dist/ProTable.d.ts +293 -823
  2. package/dist/_utils/ant-design-vue/index.d.ts +4 -2
  3. package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
  4. package/dist/_utils/ant-design-vue/table/props.d.ts +37 -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/_utils/index.d.ts +1 -1
  8. package/dist/components/Form/components/RequestSelect.d.ts +39 -0
  9. package/dist/components/Form/{useForm.d.ts → hooks/useForm.d.ts} +2 -2
  10. package/dist/components/Form/index.d.ts +19 -28
  11. package/dist/components/Form/style.d.ts +1 -1
  12. package/dist/components/Form/utils/config.d.ts +5 -0
  13. package/dist/components/Form/utils/dateFormat.d.ts +20 -0
  14. package/dist/components/ListToolBar/index.d.ts +32 -39
  15. package/dist/components/ListToolBar/style.d.ts +1 -1
  16. package/dist/components/ScrollBar/Bar/index.d.ts +44 -0
  17. package/dist/components/ScrollBar/Bar/props.d.ts +21 -0
  18. package/dist/components/ScrollBar/Thumb/index.d.ts +35 -0
  19. package/dist/components/ScrollBar/Thumb/props.d.ts +16 -0
  20. package/dist/components/ScrollBar/context.d.ts +11 -0
  21. package/dist/components/ScrollBar/util.d.ts +29 -0
  22. package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
  23. package/dist/components/ToolBar/index.d.ts +24 -25
  24. package/dist/context/TableContext.d.ts +19 -17
  25. package/dist/hooks/tryOnActivated.d.ts +2 -0
  26. package/dist/hooks/useColumns.d.ts +18 -0
  27. package/dist/hooks/useDebounceFn.d.ts +2 -2
  28. package/dist/hooks/useFetchData.d.ts +24 -17
  29. package/dist/hooks/useLoading.d.ts +5 -8
  30. package/dist/hooks/usePagination.d.ts +7 -6
  31. package/dist/hooks/useRowSelection.d.ts +11 -8
  32. package/dist/hooks/useScrollArea.d.ts +15 -0
  33. package/dist/hooks/useTable.d.ts +57 -11
  34. package/dist/hooks/useTableForm.d.ts +72 -10
  35. package/dist/hooks/useTableScroll.d.ts +14 -20
  36. package/dist/hooks/useTableSize.d.ts +4 -7
  37. package/dist/index.d.ts +8 -7
  38. package/dist/pro-table.js +2739 -0
  39. package/dist/pro-table.umd.cjs +12 -0
  40. package/dist/props.d.ts +129 -390
  41. package/dist/{components/ColumnSetting/style.d.ts → style/fit-page.d.ts} +2 -2
  42. package/dist/style/index.d.ts +6 -0
  43. package/dist/{style.d.ts → style/list.d.ts} +2 -2
  44. package/dist/style/scroll.d.ts +3 -0
  45. package/dist/types/ColumnTypings.d.ts +54 -16
  46. package/dist/types/SlotsTypings.d.ts +47 -9
  47. package/dist/types/TableTypings.d.ts +171 -80
  48. package/dist/utils/utils.d.ts +5 -1
  49. package/package.json +33 -52
  50. package/volar.d.ts +3 -3
  51. package/dist/components/ColumnSetting/hooks/useRefFunction/index.d.ts +0 -1
  52. package/dist/components/ColumnSetting/index.d.ts +0 -35
  53. package/dist/components/ToolBar/DensityIcon.d.ts +0 -3
  54. package/dist/hooks/useColumnSetting.d.ts +0 -31
  55. package/dist/hooks/useColums.d.ts +0 -24
  56. package/dist/pro-table.mjs +0 -34948
  57. package/dist/pro-table.umd.js +0 -327
  58. package/dist/typing.d.ts +0 -1
  59. package/dist/utils/config.d.ts +0 -1
@@ -1,4 +1,6 @@
1
- export * from './spin/typings';
1
+ export * from './input/typings';
2
2
  export * from './pagination/typings';
3
- export * from './table/typings';
3
+ export * from './spin/typings';
4
4
  export * from './table/props';
5
+ export * from './table/typings';
6
+ export * from './tooltip/typings';
@@ -0,0 +1 @@
1
+ export type { ChangeEvent } from 'ant-design-vue/es/_util/EventInterface';
@@ -1,2 +1,37 @@
1
- import { tableProps } from 'ant-design-vue/es/table';
2
- export { tableProps };
1
+ import type { PropType } from 'vue';
2
+ import type { SpinProps } from '../spin/typings';
3
+ import type { RcTableProps, TableProps } from './typings';
4
+ declare const omitProps: (keyof TableProps)[];
5
+ export type AntTableProps = Omit<TableProps, typeof omitProps[number]>;
6
+ export declare const tableProps: {
7
+ direction: {
8
+ type: PropType<"rtl" | "ltr">;
9
+ default: string;
10
+ };
11
+ transformCellText: PropType<TableProps["transformCellText"]>;
12
+ /**
13
+ * @Author gx12358
14
+ * @DateTime 2022/2/8
15
+ * @lastTime 2022/2/8
16
+ * @description 是否展示外边框和列边框
17
+ */
18
+ bordered: {
19
+ type: PropType<TableProps["bordered"]>;
20
+ default: undefined;
21
+ };
22
+ loading: {
23
+ type: PropType<boolean | SpinProps>;
24
+ default: undefined;
25
+ };
26
+ scroll: {
27
+ type: PropType<RcTableProps["scroll"] & {
28
+ scrollToFirstRowOnChange?: boolean;
29
+ }>;
30
+ default: undefined;
31
+ };
32
+ 'onUpdate:expandedRowKeys': {
33
+ type: import("vue").PropType<(expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void>;
34
+ default: (expandedKeys: import("ant-design-vue/es/vc-table/interface").Key[]) => void;
35
+ };
36
+ };
37
+ 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';
3
1
  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';
2
+ import type { ColumnType, TableProps } from 'ant-design-vue/es/table';
3
+ import type { ColumnsType, FilterValue, GetPopupContainer, SorterResult, SortOrder, TableCurrentDataSource, TableLocale } from 'ant-design-vue/es/table/interface';
4
+ import type { TableProps as RcTableProps } from 'ant-design-vue/es/vc-table/Table';
5
+ export type { SelectionSelectFn, TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
6
+ export type { AlignType, DataIndex, Key, RenderExpandIconProps } 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 { ColumnsType, ColumnType, FilterValue, GetPopupContainer, RcTableProps, SorterResult, SortOrder, TableCurrentDataSource, TableLocale, TableProps };
@@ -0,0 +1 @@
1
+ export type { TooltipProps } from 'ant-design-vue/es/tooltip';
@@ -1,3 +1,3 @@
1
+ export * from './ant-design-vue';
1
2
  export { initDefaultProps } from 'ant-design-vue/es/_util/props-util';
2
3
  export { noteOnce, warning } from 'ant-design-vue/es/vc-util/warning';
3
- export * from './ant-design-vue';
@@ -0,0 +1,39 @@
1
+ import type { PropType } from 'vue';
2
+ import type { ProSchemaValueEnumType } from '../../../types/ColumnTypings';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ fetch: PropType<() => Promise<ProSchemaValueEnumType[]>>;
5
+ loading: PropType<boolean>;
6
+ debounceTime: PropType<number>;
7
+ manual: {
8
+ type: PropType<boolean>;
9
+ default: undefined;
10
+ };
11
+ fieldName: {
12
+ type: PropType<string>;
13
+ default: string;
14
+ };
15
+ notFoundContent: {
16
+ type: PropType<(loading: boolean) => any>;
17
+ };
18
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
19
+ [key: string]: any;
20
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ fetch: PropType<() => Promise<ProSchemaValueEnumType[]>>;
22
+ loading: PropType<boolean>;
23
+ debounceTime: PropType<number>;
24
+ manual: {
25
+ type: PropType<boolean>;
26
+ default: undefined;
27
+ };
28
+ fieldName: {
29
+ type: PropType<string>;
30
+ default: string;
31
+ };
32
+ notFoundContent: {
33
+ type: PropType<(loading: boolean) => any>;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ manual: boolean;
37
+ fieldName: string;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  import type { RecordType } from '@gx-design-vue/pro-utils';
2
- import type { ProSearchMap } from '../../types/ColumnTypings';
3
- export declare function useForm(defaultParams: RecordType, searchMap: ProSearchMap[]): {
2
+ import type { ProSearchMap } from '../../../types/ColumnTypings';
3
+ export declare function useForm(defaultState: RecordType, searchMap: ProSearchMap[]): {
4
4
  formState: any;
5
5
  resetFormState: () => void;
6
6
  changeFormState: (key: string, value: any) => void;
@@ -1,36 +1,27 @@
1
- import type { PropType } from 'vue';
2
1
  import type { RecordType } from '@gx-design-vue/pro-utils';
2
+ import type { DefineComponent, ExtractPropTypes, PropType } from 'vue';
3
3
  import type { ProSearchMap } from '../../types/ColumnTypings';
4
- declare const ProTableForm: import("vue").DefineComponent<{
5
- search: {
6
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
7
- default: () => import("../../types/TableTypings").SearchConfig;
8
- };
9
- modal: PropType<boolean | undefined>;
10
- searchMap: {
11
- type: PropType<ProSearchMap<"text">[]>;
4
+ declare const tableForm: {
5
+ modalScroll: PropType<boolean | undefined>;
6
+ formCols: {
7
+ type: PropType<ProSearchMap[]>;
12
8
  default: () => never[];
13
9
  };
14
- loading: PropType<boolean>;
15
- prefixCls: PropType<string>;
16
- 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
- search: {
19
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
20
- default: () => import("../../types/TableTypings").SearchConfig;
10
+ loading: {
11
+ type: PropType<boolean | import("ant-design-vue").SpinProps>;
12
+ default: undefined;
21
13
  };
22
- modal: PropType<boolean | undefined>;
23
- searchMap: {
24
- type: PropType<ProSearchMap<"text">[]>;
25
- default: () => never[];
14
+ cardBordered: {
15
+ type: PropType<import("../../types/TableTypings").ProTableProps["showIndex"]>;
16
+ default: boolean;
26
17
  };
27
- loading: PropType<boolean>;
28
18
  prefixCls: PropType<string>;
29
- defaultParams: PropType<RecordType>;
30
- }>> & {
31
- onSearch?: ((...args: any[]) => any) | undefined;
32
- }, {
33
- search: import("../../types/TableTypings").SearchConfig | undefined;
34
- searchMap: ProSearchMap<"text">[];
35
- }>;
19
+ defaultFormSearch: {
20
+ type: PropType<RecordType>;
21
+ default: () => {};
22
+ };
23
+ onSearch: PropType<(formState: any, buttonActions?: "reset" | "submit") => any>;
24
+ };
25
+ export type ProTableFormProps = ExtractPropTypes<typeof tableForm>;
26
+ declare const ProTableForm: DefineComponent<ProTableFormProps>;
36
27
  export default ProTableForm;
@@ -1,3 +1,3 @@
1
- import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
2
1
  import type { ProAliasToken } from '@gx-design-vue/pro-provider';
2
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
3
3
  export declare const genTableFormStyle: GenerateStyle<ProAliasToken>;
@@ -0,0 +1,5 @@
1
+ import type { Breakpoint } from '@gx-design-vue/pro-utils';
2
+ export declare const defaultSpans: {
3
+ value: Breakpoint;
4
+ span: number;
5
+ }[];
@@ -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,62 +1,55 @@
1
- import type { PropType } from 'vue';
2
1
  import type { VueNode } from '@gx-design-vue/pro-utils';
3
- export type ListToolBarSetting = {
2
+ import type { PropType } from 'vue';
3
+ import type { TableActionPlacement } from '../../types/TableTypings';
4
+ export interface ListToolBarSetting {
4
5
  icon: VueNode;
5
6
  tooltip?: string;
6
7
  key?: string;
7
8
  onClick?: (key?: string) => void;
8
- };
9
- declare const ListToolBar: import("vue").DefineComponent<{
10
- actions: {
11
- type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
12
- default: () => undefined;
13
- };
9
+ }
10
+ declare const ListToolBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ actions: PropType<VueNode[]>;
14
12
  settings: PropType<VueNode[]>;
15
- titleTip: {
16
- type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
17
- default: () => undefined;
18
- };
19
13
  prefixCls: StringConstructor;
20
14
  headerTitle: {
21
- type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
15
+ type: PropType<import("../../types/TableTypings").ProTableProps["headerTitle"]>;
22
16
  default: () => undefined;
23
17
  };
24
- titleTipText: {
25
- type: PropType<string | undefined>;
26
- default: string;
27
- };
28
- optionsExtra: {
29
- type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
18
+ listToolAfter: {
19
+ type: PropType<import("../../types/TableTypings").ProTableProps["listToolAfter"]>;
30
20
  default: () => undefined;
31
21
  };
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<{
33
- actions: {
34
- type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
22
+ headerTitleTip: {
23
+ type: PropType<import("../../types/TableTypings").ProTableProps["headerTitleTip"]>;
35
24
  default: () => undefined;
36
25
  };
37
- settings: PropType<VueNode[]>;
38
- titleTip: {
39
- type: PropType<import("../../types/SlotsTypings").TitleTipRender>;
40
- default: () => undefined;
26
+ titleTipText: {
27
+ type: PropType<import("../../types/TableTypings").ProTableProps["titleTipText"]>;
41
28
  };
29
+ actionsPlacement: PropType<TableActionPlacement>;
30
+ }>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
+ actions: PropType<VueNode[]>;
32
+ settings: PropType<VueNode[]>;
42
33
  prefixCls: StringConstructor;
43
34
  headerTitle: {
44
- type: PropType<import("../../types/SlotsTypings").HeaderTitleRender>;
35
+ type: PropType<import("../../types/TableTypings").ProTableProps["headerTitle"]>;
45
36
  default: () => undefined;
46
37
  };
47
- titleTipText: {
48
- type: PropType<string | undefined>;
49
- default: string;
38
+ listToolAfter: {
39
+ type: PropType<import("../../types/TableTypings").ProTableProps["listToolAfter"]>;
40
+ default: () => undefined;
50
41
  };
51
- optionsExtra: {
52
- type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
42
+ headerTitleTip: {
43
+ type: PropType<import("../../types/TableTypings").ProTableProps["headerTitleTip"]>;
53
44
  default: () => undefined;
54
45
  };
55
- }>>, {
56
- 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
- }>;
46
+ titleTipText: {
47
+ type: PropType<import("../../types/TableTypings").ProTableProps["titleTipText"]>;
48
+ };
49
+ actionsPlacement: PropType<TableActionPlacement>;
50
+ }>> & Readonly<{}>, {
51
+ headerTitle: import("../../types/SlotsTypings").DefaultRender;
52
+ headerTitleTip: import("../../types/SlotsTypings").DefaultRender;
53
+ listToolAfter: import("../../types/SlotsTypings").DefaultRender;
54
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
55
  export default ListToolBar;
@@ -1,3 +1,3 @@
1
- import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
2
1
  import type { ProAliasToken } from '@gx-design-vue/pro-provider';
2
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
3
3
  export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
@@ -0,0 +1,44 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ import { barProps } from './props';
3
+ export type BarProps = ExtractPropTypes<typeof barProps>;
4
+ declare const Bar: import("vue").DefineComponent<ExtractPropTypes<{
5
+ always: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
9
+ minSize: {
10
+ type: import("vue").PropType<number>;
11
+ default: number;
12
+ };
13
+ barStyle: {
14
+ type: import("vue").PropType<{
15
+ x: import("vue").CSSProperties;
16
+ y: import("vue").CSSProperties;
17
+ }>;
18
+ default: () => {};
19
+ };
20
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
21
+ always: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ minSize: {
26
+ type: import("vue").PropType<number>;
27
+ default: number;
28
+ };
29
+ barStyle: {
30
+ type: import("vue").PropType<{
31
+ x: import("vue").CSSProperties;
32
+ y: import("vue").CSSProperties;
33
+ }>;
34
+ default: () => {};
35
+ };
36
+ }>> & Readonly<{}>, {
37
+ always: boolean;
38
+ barStyle: {
39
+ x: import("vue").CSSProperties;
40
+ y: import("vue").CSSProperties;
41
+ };
42
+ minSize: number;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
+ export default Bar;
@@ -0,0 +1,21 @@
1
+ import type { CSSProperties, PropType } from 'vue';
2
+ export declare const barProps: {
3
+ always: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ minSize: {
8
+ type: PropType<number>;
9
+ default: number;
10
+ };
11
+ /**
12
+ * @description style of bar
13
+ */
14
+ barStyle: {
15
+ type: PropType<{
16
+ x: CSSProperties;
17
+ y: CSSProperties;
18
+ }>;
19
+ default: () => {};
20
+ };
21
+ };
@@ -0,0 +1,35 @@
1
+ import type { ExtractPropTypes, CSSProperties } from 'vue';
2
+ import { thumbProps } from './props';
3
+ export type ThumbProps = ExtractPropTypes<typeof thumbProps>;
4
+ declare const Thumb: import("vue").DefineComponent<ExtractPropTypes<{
5
+ vertical: BooleanConstructor;
6
+ size: StringConstructor;
7
+ move: NumberConstructor;
8
+ ratio: {
9
+ type: NumberConstructor;
10
+ required: boolean;
11
+ };
12
+ always: BooleanConstructor;
13
+ barStyle: {
14
+ type: import("vue").PropType<CSSProperties>;
15
+ default: () => {};
16
+ };
17
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
18
+ vertical: BooleanConstructor;
19
+ size: StringConstructor;
20
+ move: NumberConstructor;
21
+ ratio: {
22
+ type: NumberConstructor;
23
+ required: boolean;
24
+ };
25
+ always: BooleanConstructor;
26
+ barStyle: {
27
+ type: import("vue").PropType<CSSProperties>;
28
+ default: () => {};
29
+ };
30
+ }>> & Readonly<{}>, {
31
+ always: boolean;
32
+ vertical: boolean;
33
+ barStyle: CSSProperties;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
+ export default Thumb;
@@ -0,0 +1,16 @@
1
+ import type { CSSProperties, ExtractPropTypes, PropType } from 'vue';
2
+ export declare const thumbProps: {
3
+ vertical: BooleanConstructor;
4
+ size: StringConstructor;
5
+ move: NumberConstructor;
6
+ ratio: {
7
+ type: NumberConstructor;
8
+ required: boolean;
9
+ };
10
+ always: BooleanConstructor;
11
+ barStyle: {
12
+ type: PropType<CSSProperties>;
13
+ default: () => {};
14
+ };
15
+ };
16
+ export type ThumbProps = ExtractPropTypes<typeof thumbProps>;
@@ -0,0 +1,11 @@
1
+ import type { Ref } from 'vue';
2
+ export interface ScrollbarContext {
3
+ className: string;
4
+ hashId: Ref<string>;
5
+ tableHeaderHeight: Ref<number>;
6
+ tableScrollYHeight: Ref<number>;
7
+ scrollbarElement: Ref<HTMLElement | undefined>;
8
+ wrapElement: Ref<HTMLElement | undefined>;
9
+ }
10
+ declare const useScrollBarContext: (injectDefaultValue?: ScrollbarContext | undefined) => ScrollbarContext, provideScrollBarContext: (value: ScrollbarContext) => void;
11
+ export { provideScrollBarContext, useScrollBarContext };
@@ -0,0 +1,29 @@
1
+ import type { CSSProperties } from 'vue';
2
+ export declare const GAP = 4;
3
+ export declare const BAR_MAP: {
4
+ readonly vertical: {
5
+ readonly offset: "offsetHeight";
6
+ readonly scroll: "scrollTop";
7
+ readonly scrollSize: "scrollHeight";
8
+ readonly size: "height";
9
+ readonly key: "vertical";
10
+ readonly axis: "Y";
11
+ readonly client: "clientY";
12
+ readonly direction: "top";
13
+ };
14
+ readonly horizontal: {
15
+ readonly offset: "offsetWidth";
16
+ readonly scroll: "scrollLeft";
17
+ readonly scrollSize: "scrollWidth";
18
+ readonly size: "width";
19
+ readonly key: "horizontal";
20
+ readonly axis: "X";
21
+ readonly client: "clientX";
22
+ readonly direction: "left";
23
+ };
24
+ };
25
+ export declare const renderThumbStyle: ({ move, size, bar, }: Pick<any, "move" | "size"> & {
26
+ bar: (typeof BAR_MAP)[keyof typeof BAR_MAP];
27
+ }) => CSSProperties;
28
+ export declare const isStringNumber: (val: string) => boolean;
29
+ export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
@@ -1,2 +1,2 @@
1
- declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const FullScreenIcon: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
2
  export default FullScreenIcon;
@@ -1,30 +1,29 @@
1
- import type { PropType } from 'vue';
2
- import type { ProTableProps, OptionConfig } from '../../types/TableTypings';
1
+ import type { PropType, VNode } from 'vue';
2
+ import type { OptionConfig, ProTableProps, TableActionPlacement } from '../../types/TableTypings';
3
3
  export type OptionsFunctionType = () => void;
4
- export type ToolBarProps = {
4
+ export interface ToolBarProps {
5
+ actionsRender?: VNode[];
5
6
  headerTitle?: ProTableProps['headerTitle'];
6
- titleTip?: ProTableProps['titleTip'];
7
- toolBarBtn?: ProTableProps['toolBarBtn'];
7
+ listToolAfter?: ProTableProps['listToolAfter'];
8
+ headerTitleTip?: ProTableProps['headerTitleTip'];
8
9
  titleTipText?: ProTableProps['titleTipText'];
9
- optionsExtra?: ProTableProps['optionsExtra'];
10
- settingExtra?: ProTableProps['settingExtra'];
11
10
  options?: OptionConfig | boolean;
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
- }>>, {}>;
11
+ }
12
+ declare const ToolbarRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
+ options: PropType<ProTableProps["options"]>;
14
+ actionsPlacement: PropType<TableActionPlacement>;
15
+ headerTitle: PropType<ProTableProps["headerTitle"]>;
16
+ listToolAfter: PropType<ProTableProps["listToolAfter"]>;
17
+ headerTitleTip: PropType<ProTableProps["headerTitleTip"]>;
18
+ titleTipText: PropType<ProTableProps["titleTipText"]>;
19
+ actionsRender: PropType<ToolBarProps["actionsRender"]>;
20
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
+ options: PropType<ProTableProps["options"]>;
22
+ actionsPlacement: PropType<TableActionPlacement>;
23
+ headerTitle: PropType<ProTableProps["headerTitle"]>;
24
+ listToolAfter: PropType<ProTableProps["listToolAfter"]>;
25
+ headerTitleTip: PropType<ProTableProps["headerTitleTip"]>;
26
+ titleTipText: PropType<ProTableProps["titleTipText"]>;
27
+ actionsRender: PropType<ToolBarProps["actionsRender"]>;
28
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
29
  export default ToolbarRender;
@@ -1,26 +1,28 @@
1
- import type { Ref, ComputedRef } from 'vue';
2
- import type { InjectionKey, Slots } from 'vue';
3
1
  import type { SizeType } from '@gx-design-vue/pro-utils';
4
- import type { ProColumnsType } from '../types/ColumnTypings';
5
- import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
2
+ import type { ComputedRef, Ref } from 'vue';
6
3
  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?: {
4
+ import type { ProColumnsType } from '../types/ColumnTypings';
5
+ import type { FormConfig, TableClassNamesType, TableScroll, TableStylesType } from '../types/TableTypings';
6
+ export interface ProTableContextProps {
7
+ columns: ComputedRef<ProColumnsType>;
8
+ isMobile: ComputedRef<boolean>;
9
+ formConfig: ComputedRef<FormConfig>;
10
+ formActions: ComputedRef<FormConfig['actions']>;
11
+ formAutoRequest: ComputedRef<boolean>;
12
+ cacheColumns: ComputedRef<ProColumnsType>;
13
+ tableSize: Ref<SizeType>;
14
+ tableScrollState: ComputedRef<TableScroll>;
15
+ screenWidth: Ref<number>;
16
+ styles: Ref<TableStylesType>;
17
+ classNames: Ref<TableClassNamesType>;
18
+ tableListToolsHeight: Ref<number>;
19
+ action: {
13
20
  /** @name 刷新 */
14
21
  reload: (info?: any) => void;
15
22
  toggle: () => Promise<void>;
16
23
  setTableSize: (size: SizeType) => void;
17
24
  };
18
25
  setPagination: (info: Partial<PaginationProps>) => void;
19
- settingsAction: SettingsAction;
20
- slots: Slots;
21
- changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
22
- [key: string]: any;
23
26
  }
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>;
27
+ declare const provideTableContext: (value: ProTableContextProps) => void, useTableContext: (injectDefaultValue?: ProTableContextProps | undefined) => ProTableContextProps;
28
+ export { provideTableContext, useTableContext };
@@ -0,0 +1,2 @@
1
+ import type { Fn } from '@gx-design-vue/pro-utils';
2
+ export declare function tryOnActivated(fn: Fn, sync?: boolean, target?: any): void;
@@ -0,0 +1,18 @@
1
+ import type { ComputedRef, Ref } from 'vue';
2
+ import type { ProColumnsType, ProColumnType } from '../types/ColumnTypings';
3
+ import type { ProTableProps } from '../types/TableTypings';
4
+ interface UseColumnsType {
5
+ scroll: ComputedRef<ProTableProps['scroll']>;
6
+ breakpoint: ComputedRef<boolean | undefined>;
7
+ columns: ComputedRef<ProColumnsType>;
8
+ draggable: Ref<ProTableProps['draggable']>;
9
+ neverScroll: Ref<ProTableProps['neverScroll']>;
10
+ autoScroll: Ref<ProTableProps['autoScroll']>;
11
+ }
12
+ export declare function useColumns({ scroll, columns, breakpoint, draggable, autoScroll, neverScroll }: UseColumnsType): {
13
+ breakpoint: ComputedRef<boolean | undefined>;
14
+ proColumns: ComputedRef<ProColumnsType>;
15
+ setColumns: (columnList: ProColumnsType) => void;
16
+ resizeColumnWidth: (width: number, col: ProColumnType) => void;
17
+ };
18
+ export {};
@@ -1,6 +1,6 @@
1
- export type ReturnValue<T extends any[]> = {
1
+ export interface ReturnValue<T extends any[]> {
2
2
  run: (...args: T) => void;
3
3
  cancel: () => void;
4
- };
4
+ }
5
5
  declare function useDebounceFn<T extends any[]>(fn: (...args: T) => Promise<any>, wait?: number): ReturnValue<T>;
6
6
  export default useDebounceFn;