@gx-design-vue/pro-table 0.2.0-beta.13 → 0.2.0-beta.131
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.
- package/dist/ProTable.d.ts +253 -792
- package/dist/_utils/ant-design-vue/index.d.ts +4 -2
- package/dist/_utils/ant-design-vue/input/typings.d.ts +1 -0
- package/dist/_utils/ant-design-vue/table/props.d.ts +33 -2
- package/dist/_utils/ant-design-vue/table/typings.d.ts +6 -5
- package/dist/_utils/ant-design-vue/tooltip/typings.d.ts +1 -0
- package/dist/_utils/index.d.ts +1 -1
- package/dist/components/Form/components/RequestSelect.d.ts +39 -0
- package/dist/components/Form/{useForm.d.ts → hooks/useForm.d.ts} +1 -1
- package/dist/components/Form/index.d.ts +15 -27
- package/dist/components/Form/style.d.ts +2 -5
- package/dist/components/Form/utils/config.d.ts +5 -0
- package/dist/components/Form/utils/dateFormat.d.ts +20 -0
- package/dist/components/ListToolBar/index.d.ts +20 -33
- package/dist/components/ListToolBar/style.d.ts +2 -5
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +22 -23
- package/dist/context/TableContext.d.ts +15 -16
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -7
- package/dist/hooks/useColumns.d.ts +101 -0
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +21 -16
- package/dist/hooks/useLoading.d.ts +5 -8
- package/dist/hooks/usePagination.d.ts +7 -6
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useTable.d.ts +40 -11
- package/dist/hooks/useTableForm.d.ts +9 -9
- package/dist/hooks/useTableScroll.d.ts +17 -18
- package/dist/hooks/useTableSize.d.ts +4 -7
- package/dist/index.d.ts +8 -7
- package/dist/pro-table.js +2307 -0
- package/dist/pro-table.umd.cjs +12 -0
- package/dist/props.d.ts +94 -377
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +54 -16
- package/dist/types/SlotsTypings.d.ts +47 -9
- package/dist/types/TableTypings.d.ts +124 -76
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +31 -51
- package/volar.d.ts +3 -3
- package/dist/components/ColumnSetting/hooks/useRefFunction/index.d.ts +0 -1
- package/dist/components/ColumnSetting/index.d.ts +0 -35
- package/dist/components/ColumnSetting/style.d.ts +0 -6
- package/dist/components/ToolBar/DensityIcon.d.ts +0 -3
- package/dist/hooks/useColums.d.ts +0 -24
- package/dist/pro-table.mjs +0 -35100
- package/dist/pro-table.umd.js +0 -364
- package/dist/typing.d.ts +0 -1
- package/dist/utils/config.d.ts +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './input/typings';
|
|
2
2
|
export * from './pagination/typings';
|
|
3
|
-
export * from './
|
|
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,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
+
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';
|
|
3
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
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';
|
package/dist/_utils/index.d.ts
CHANGED
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
2
|
-
import type { ProSearchMap } from '
|
|
2
|
+
import type { ProSearchMap } from '../../../types/ColumnTypings';
|
|
3
3
|
export declare function useForm(defaultParams: RecordType, searchMap: ProSearchMap[]): {
|
|
4
4
|
formState: any;
|
|
5
5
|
resetFormState: () => void;
|
|
@@ -1,36 +1,24 @@
|
|
|
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
|
|
5
|
-
|
|
6
|
-
type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
|
|
7
|
-
default: () => import("../../types/TableTypings").SearchConfig;
|
|
8
|
-
};
|
|
9
|
-
modal: PropType<boolean | undefined>;
|
|
4
|
+
declare const tableForm: {
|
|
5
|
+
modalScroll: PropType<boolean | undefined>;
|
|
10
6
|
searchMap: {
|
|
11
|
-
type: PropType<ProSearchMap
|
|
7
|
+
type: PropType<ProSearchMap[]>;
|
|
12
8
|
default: () => never[];
|
|
13
9
|
};
|
|
14
|
-
loading:
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
searchMap: ProSearchMap<"text">[];
|
|
35
|
-
}>;
|
|
19
|
+
defaultState: PropType<RecordType>;
|
|
20
|
+
onSearch: PropType<(formState: any, buttonActions?: "reset" | "submit") => any>;
|
|
21
|
+
};
|
|
22
|
+
export type ProTableFormProps = ExtractPropTypes<typeof tableForm>;
|
|
23
|
+
declare const ProTableForm: DefineComponent<ProTableFormProps>;
|
|
36
24
|
export default ProTableForm;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
|
|
6
|
-
export default _default;
|
|
2
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
3
|
+
export declare const genTableFormStyle: 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,62 +1,49 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
1
|
import type { VueNode } from '@gx-design-vue/pro-utils';
|
|
3
|
-
|
|
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
13
|
titleTip: {
|
|
16
|
-
type: PropType<import("../../types/
|
|
14
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["titleTip"]>;
|
|
17
15
|
default: () => undefined;
|
|
18
16
|
};
|
|
19
17
|
prefixCls: StringConstructor;
|
|
20
18
|
headerTitle: {
|
|
21
|
-
type: PropType<import("../../types/
|
|
19
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["headerTitle"]>;
|
|
22
20
|
default: () => undefined;
|
|
23
21
|
};
|
|
24
22
|
titleTipText: {
|
|
25
|
-
type: PropType<
|
|
23
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["titleTipText"]>;
|
|
26
24
|
default: string;
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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<{
|
|
33
|
-
actions: {
|
|
34
|
-
type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
|
|
35
|
-
default: () => undefined;
|
|
36
|
-
};
|
|
26
|
+
actionsPlacement: PropType<TableActionPlacement>;
|
|
27
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
actions: PropType<VueNode[]>;
|
|
37
29
|
settings: PropType<VueNode[]>;
|
|
38
30
|
titleTip: {
|
|
39
|
-
type: PropType<import("../../types/
|
|
31
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["titleTip"]>;
|
|
40
32
|
default: () => undefined;
|
|
41
33
|
};
|
|
42
34
|
prefixCls: StringConstructor;
|
|
43
35
|
headerTitle: {
|
|
44
|
-
type: PropType<import("../../types/
|
|
36
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["headerTitle"]>;
|
|
45
37
|
default: () => undefined;
|
|
46
38
|
};
|
|
47
39
|
titleTipText: {
|
|
48
|
-
type: PropType<
|
|
40
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["titleTipText"]>;
|
|
49
41
|
default: string;
|
|
50
42
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}>>, {
|
|
43
|
+
actionsPlacement: PropType<TableActionPlacement>;
|
|
44
|
+
}>> & Readonly<{}>, {
|
|
45
|
+
headerTitle: import("../../types/SlotsTypings").DefaultRender;
|
|
46
|
+
titleTip: import("../../types/SlotsTypings").DefaultRender;
|
|
56
47
|
titleTipText: string | undefined;
|
|
57
|
-
|
|
58
|
-
headerTitle: import("../../types/SlotsTypings").HeaderTitleRender;
|
|
59
|
-
optionsExtra: import("../../types/SlotsTypings").OptionsExtraRender;
|
|
60
|
-
actions: import("../../types/SlotsTypings").ToolBarBtnRender;
|
|
61
|
-
}>;
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
49
|
export default ListToolBar;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { ProAliasToken } from '@gx-design-vue/pro-provider';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
declare const _default: (_prefixCls?: string | import("vue").Ref<string> | undefined) => import("ant-design-vue/es/theme/internal").UseComponentStyleResult;
|
|
6
|
-
export default _default;
|
|
2
|
+
import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
|
|
3
|
+
export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
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,
|
|
1
|
+
import type { PropType, VNode } from 'vue';
|
|
2
|
+
import type { OptionConfig, ProTableProps, TableActionPlacement } from '../../types/TableTypings';
|
|
3
3
|
export type OptionsFunctionType = () => void;
|
|
4
|
-
export
|
|
4
|
+
export interface ToolBarProps {
|
|
5
|
+
actionsRender?: VNode[];
|
|
5
6
|
headerTitle?: ProTableProps['headerTitle'];
|
|
6
7
|
titleTip?: ProTableProps['titleTip'];
|
|
7
|
-
toolBarBtn?: ProTableProps['toolBarBtn'];
|
|
8
8
|
titleTipText?: ProTableProps['titleTipText'];
|
|
9
|
-
optionsExtra?: ProTableProps['optionsExtra'];
|
|
10
9
|
settingExtra?: ProTableProps['settingExtra'];
|
|
11
10
|
options?: OptionConfig | boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const ToolbarRender: import("vue").DefineComponent<{
|
|
14
|
-
options: PropType<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
titleTipText: PropType<
|
|
19
|
-
|
|
20
|
-
headerTitle: PropType<
|
|
21
|
-
}
|
|
22
|
-
options: PropType<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
titleTipText: PropType<
|
|
27
|
-
|
|
28
|
-
headerTitle: PropType<
|
|
29
|
-
}
|
|
11
|
+
}
|
|
12
|
+
declare const ToolbarRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
options: PropType<ProTableProps["options"]>;
|
|
14
|
+
actionsPlacement: PropType<TableActionPlacement>;
|
|
15
|
+
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
16
|
+
settingExtra: PropType<ProTableProps["settingExtra"]>;
|
|
17
|
+
titleTipText: PropType<ProTableProps["titleTipText"]>;
|
|
18
|
+
actionsRender: PropType<ToolBarProps["actionsRender"]>;
|
|
19
|
+
headerTitle: PropType<ProTableProps["headerTitle"]>;
|
|
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
|
+
titleTip: PropType<ProTableProps["titleTip"]>;
|
|
24
|
+
settingExtra: PropType<ProTableProps["settingExtra"]>;
|
|
25
|
+
titleTipText: PropType<ProTableProps["titleTipText"]>;
|
|
26
|
+
actionsRender: PropType<ToolBarProps["actionsRender"]>;
|
|
27
|
+
headerTitle: PropType<ProTableProps["headerTitle"]>;
|
|
28
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
29
|
export default ToolbarRender;
|
|
@@ -1,26 +1,25 @@
|
|
|
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 {
|
|
5
|
-
import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
|
|
2
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
6
3
|
import type { PaginationProps } from '../_utils';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import type { ColumnsState } from '../hooks/useColumnSetting';
|
|
5
|
+
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
6
|
+
import type { SearchConfig } from '../types/TableTypings';
|
|
7
|
+
export interface ProTableContextProps {
|
|
8
|
+
columns: ComputedRef<ProColumnsType>;
|
|
9
|
+
isMobile: ComputedRef<boolean>;
|
|
10
|
+
searchConfig: ComputedRef<SearchConfig>;
|
|
11
|
+
searchActions: ComputedRef<SearchConfig['actions']>;
|
|
12
|
+
autoRequest: ComputedRef<boolean>;
|
|
13
|
+
cacheColumns: ComputedRef<ProColumnsType>;
|
|
14
|
+
tableSize: Ref<SizeType>;
|
|
15
|
+
action: {
|
|
13
16
|
/** @name 刷新 */
|
|
14
17
|
reload: (info?: any) => void;
|
|
15
18
|
toggle: () => Promise<void>;
|
|
16
19
|
setTableSize: (size: SizeType) => void;
|
|
17
20
|
};
|
|
18
21
|
setPagination: (info: Partial<PaginationProps>) => void;
|
|
19
|
-
settingsAction: SettingsAction;
|
|
20
|
-
slots: Slots;
|
|
21
22
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
22
|
-
[key: string]: any;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
export declare const useTableContext: () => Required<TableContextProps>;
|
|
24
|
+
declare const provideTableContext: (value: ProTableContextProps) => void, useTableContext: (injectDefaultValue?: ProTableContextProps | undefined) => ProTableContextProps;
|
|
25
|
+
export { provideTableContext, useTableContext };
|
|
@@ -2,7 +2,7 @@ import type { Ref } from 'vue';
|
|
|
2
2
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
4
|
export type SettingsOperationType = 'fixed' | 'drop' | 'show' | undefined;
|
|
5
|
-
export
|
|
5
|
+
export interface ColumnsState {
|
|
6
6
|
show?: boolean;
|
|
7
7
|
fixed?: 'right' | 'left' | boolean | undefined;
|
|
8
8
|
order?: number;
|
|
@@ -10,20 +10,19 @@ export type ColumnsState = {
|
|
|
10
10
|
checkbox: boolean;
|
|
11
11
|
icon: boolean;
|
|
12
12
|
};
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
}
|
|
14
|
+
export interface SettingsAction {
|
|
15
15
|
autoScroll?: Ref<ProTableProps['autoScroll']>;
|
|
16
16
|
sortKeyColumns: Ref<string[]>;
|
|
17
17
|
columnsMap: Record<string, ColumnsState>;
|
|
18
18
|
operationType: Ref<SettingsOperationType>;
|
|
19
19
|
setSortKeyColumns: (value: string[]) => void;
|
|
20
|
-
cacheColumnsMap: Record<string, ColumnsState>;
|
|
21
20
|
setColumnsMap: (value: Record<string, ColumnsState>, key?: SettingsOperationType) => void;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
21
|
+
}
|
|
22
|
+
export interface ColumnsStateType {
|
|
24
23
|
value?: Record<string, ColumnsState>;
|
|
25
24
|
onChange?: (map: Record<string, ColumnsState>) => void;
|
|
26
|
-
}
|
|
25
|
+
}
|
|
27
26
|
export declare function useColumnSetting({ columns, columnsState, changeColumns }: {
|
|
28
27
|
columns: Ref<ProColumnsType>;
|
|
29
28
|
columnsState: Ref<ColumnsStateType | undefined>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { ProColumnsType, ProColumnType } from '../types/ColumnTypings';
|
|
3
|
+
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
+
import type { ColumnsState } from './useColumnSetting';
|
|
5
|
+
export interface ConfigColumns {
|
|
6
|
+
draggable: ComputedRef<ProTableProps['draggable']>;
|
|
7
|
+
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
8
|
+
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
9
|
+
}
|
|
10
|
+
type UseColumnsType = {
|
|
11
|
+
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
13
|
+
columns: ComputedRef<ProColumnsType>;
|
|
14
|
+
} & ConfigColumns;
|
|
15
|
+
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
|
+
export declare function useColumns({ scroll, columns, breakpoint, draggable, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
|
+
proColumns: ComputedRef<(import("../types/ColumnTypings").DefaultProColumnWithKeyOrDataIndex<import("@gx-design-vue/pro-utils/dist").RecordType> & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, keyof import("../types/ColumnTypings").DefaultProColumn | "key" | "dataIndex"> & {
|
|
19
|
+
children?: ProColumnsType<import("@gx-design-vue/pro-utils/dist").RecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
|
|
20
|
+
index?: number;
|
|
21
|
+
copyText?: string | ((record: ProColumnType) => string);
|
|
22
|
+
tooltip?: false | (Partial<import("vue").ExtractPropTypes<{
|
|
23
|
+
title: import("vue-types").VueTypeValidableDef<any>;
|
|
24
|
+
trigger: import("vue").PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
|
|
25
|
+
open: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
visible: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: any;
|
|
32
|
+
};
|
|
33
|
+
placement: import("vue").PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
|
|
34
|
+
color: import("vue").PropType<import("ant-design-vue/es/_util/type").LiteralUnion<import("ant-design-vue/es/_util/colors").PresetColorType>>;
|
|
35
|
+
transitionName: StringConstructor;
|
|
36
|
+
overlayStyle: {
|
|
37
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
38
|
+
default: import("vue").CSSProperties;
|
|
39
|
+
};
|
|
40
|
+
overlayInnerStyle: {
|
|
41
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
42
|
+
default: import("vue").CSSProperties;
|
|
43
|
+
};
|
|
44
|
+
overlayClassName: StringConstructor;
|
|
45
|
+
openClassName: StringConstructor;
|
|
46
|
+
prefixCls: StringConstructor;
|
|
47
|
+
mouseEnterDelay: NumberConstructor;
|
|
48
|
+
mouseLeaveDelay: NumberConstructor;
|
|
49
|
+
getPopupContainer: import("vue").PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
50
|
+
arrowPointAtCenter: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
arrow: {
|
|
55
|
+
type: import("vue").PropType<boolean | {
|
|
56
|
+
pointAtCenter?: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
default: boolean | {
|
|
59
|
+
pointAtCenter?: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
autoAdjustOverflow: {
|
|
63
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
|
|
64
|
+
default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
|
|
65
|
+
};
|
|
66
|
+
destroyTooltipOnHide: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: any;
|
|
69
|
+
};
|
|
70
|
+
align: {
|
|
71
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
|
|
72
|
+
default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
|
|
73
|
+
};
|
|
74
|
+
builtinPlacements: {
|
|
75
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
|
|
76
|
+
default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
|
|
77
|
+
};
|
|
78
|
+
children: ArrayConstructor;
|
|
79
|
+
onVisibleChange: import("vue").PropType<(vis: boolean) => void>;
|
|
80
|
+
'onUpdate:visible': import("vue").PropType<(vis: boolean) => void>;
|
|
81
|
+
onOpenChange: import("vue").PropType<(vis: boolean) => void>;
|
|
82
|
+
'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
|
|
83
|
+
}>> & {
|
|
84
|
+
width?: number;
|
|
85
|
+
targetStyle?: Partial<import("vue").CSSProperties>;
|
|
86
|
+
hiddenLine?: number;
|
|
87
|
+
class?: string;
|
|
88
|
+
}) | undefined;
|
|
89
|
+
show?: boolean;
|
|
90
|
+
order?: number;
|
|
91
|
+
hideInSetting?: boolean;
|
|
92
|
+
searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
|
|
93
|
+
copyable?: boolean;
|
|
94
|
+
columnEmptyText?: string;
|
|
95
|
+
valueType?: import("../types/ColumnTypings").ProColumnsValueType;
|
|
96
|
+
})[]>;
|
|
97
|
+
setColumns: (columnList: ProColumnsType) => void;
|
|
98
|
+
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
|
99
|
+
resizeColumnWidth: (width: number, col: ProColumnType) => void;
|
|
100
|
+
};
|
|
101
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
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;
|
|
@@ -1,38 +1,43 @@
|
|
|
1
|
-
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
-
import type { TableSorter } from '../_utils';
|
|
3
1
|
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
4
|
-
import type {
|
|
2
|
+
import type { ComputedRef, Reactive, Ref } from 'vue';
|
|
3
|
+
import type { FilterValue, SorterResult, TableCurrentDataSource } from '../_utils';
|
|
5
4
|
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
5
|
+
import type { ProTableFetchParams, ProTablePagination, ProTablePaginationConfig, ProTableProps, SearchConfig } from '../types/TableTypings';
|
|
6
6
|
interface ActionType {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
loading: Ref<boolean>;
|
|
8
|
+
search: ComputedRef<SearchConfig | false>;
|
|
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
|
-
|
|
16
|
+
formState: Reactive<RecordType>;
|
|
16
17
|
onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
|
|
18
|
+
hasCustomRender: ComputedRef<boolean>;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
20
|
+
export interface ConfigFetchData {
|
|
21
|
+
rowKey: ComputedRef<ProTableProps['rowKey']>;
|
|
19
22
|
polling: ComputedRef<ProTableProps['polling']>;
|
|
20
|
-
request:
|
|
21
|
-
postData:
|
|
23
|
+
request: ProTableProps['request'];
|
|
24
|
+
postData: ProTableProps['postData'];
|
|
22
25
|
waitRequest: Ref<ProTableProps['waitRequest']>;
|
|
23
26
|
debounceTime: ComputedRef<ProTableProps['debounceTime']>;
|
|
24
27
|
dataSource: ComputedRef<ProTableProps['dataSource']>;
|
|
25
|
-
}
|
|
28
|
+
}
|
|
26
29
|
export declare function useConfigFetchData(props: ProTableProps): Omit<ConfigFetchData, 'waitRequest'>;
|
|
27
|
-
export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { columns,
|
|
28
|
-
|
|
30
|
+
export declare function useFetchData({ rowKey, polling, request, postData, dataSource, waitRequest, debounceTime }: ConfigFetchData, { search, columns, loading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formState, setPagination, paginationInfo, onBeforeSearchSubmit, hasCustomRender }: ActionType, emit: any): {
|
|
31
|
+
dataSource: ComputedRef<RecordType[]>;
|
|
29
32
|
isTreeDataRef: ComputedRef<boolean>;
|
|
30
33
|
reSetDataList: (list: RecordType[]) => void;
|
|
31
|
-
changeDataValue: ({ key,
|
|
34
|
+
changeDataValue: ({ key, type, row, value }: {
|
|
35
|
+
row?: Partial<RecordType> | undefined;
|
|
32
36
|
key?: string | undefined;
|
|
33
|
-
|
|
37
|
+
value?: any;
|
|
38
|
+
type?: "update" | "push" | "delete" | "unshift";
|
|
34
39
|
}) => void;
|
|
35
|
-
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string,
|
|
36
|
-
reload: (info?:
|
|
40
|
+
handleTableChange: (pagination: ProTablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult | SorterResult[], extra?: TableCurrentDataSource) => void;
|
|
41
|
+
reload: (info?: ProTableFetchParams) => Promise<void>;
|
|
37
42
|
};
|
|
38
43
|
export {};
|