@gx-design-vue/pro-table 0.2.0-beta.12 → 0.2.0-beta.120
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 +236 -779
- 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/ColumnSetting/index.d.ts +17 -17
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- 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 +13 -25
- 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 +21 -21
- 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 +20 -20
- package/dist/context/TableContext.d.ts +16 -14
- package/dist/hooks/tryOnActivated.d.ts +2 -0
- package/dist/hooks/useColumnSetting.d.ts +6 -6
- package/dist/hooks/useColumns.d.ts +102 -0
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +20 -15
- package/dist/hooks/useLoading.d.ts +4 -3
- package/dist/hooks/usePagination.d.ts +10 -6
- package/dist/hooks/useRowSelection.d.ts +11 -8
- package/dist/hooks/useTable.d.ts +38 -11
- package/dist/hooks/useTableForm.d.ts +6 -6
- package/dist/hooks/useTableScroll.d.ts +11 -11
- package/dist/hooks/useTableSize.d.ts +2 -2
- package/dist/index.d.ts +8 -7
- package/dist/pro-table.js +2860 -0
- package/dist/pro-table.umd.cjs +12 -0
- package/dist/props.d.ts +95 -360
- 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 +119 -68
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +33 -50
- package/volar.d.ts +3 -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
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
2
|
+
import type { DefaultRender } from '../../types/SlotsTypings';
|
|
3
|
+
export interface ColumnSettingProps {
|
|
4
4
|
draggable?: boolean;
|
|
5
5
|
checkable?: boolean;
|
|
6
|
-
extra?:
|
|
6
|
+
extra?: DefaultRender;
|
|
7
7
|
checkedReset?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const ColumnSetting: import("vue").DefineComponent<{
|
|
8
|
+
}
|
|
9
|
+
declare const ColumnSetting: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
10
|
draggable: {
|
|
11
|
-
type: PropType<
|
|
11
|
+
type: PropType<ColumnSettingProps["draggable"]>;
|
|
12
12
|
default: undefined;
|
|
13
13
|
};
|
|
14
14
|
checkable: {
|
|
15
|
-
type: PropType<
|
|
15
|
+
type: PropType<ColumnSettingProps["checkable"]>;
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
|
-
checkedReset: PropType<
|
|
19
|
-
extra: PropType<
|
|
20
|
-
}
|
|
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<
|
|
22
|
+
type: PropType<ColumnSettingProps["draggable"]>;
|
|
23
23
|
default: undefined;
|
|
24
24
|
};
|
|
25
25
|
checkable: {
|
|
26
|
-
type: PropType<
|
|
26
|
+
type: PropType<ColumnSettingProps["checkable"]>;
|
|
27
27
|
default: undefined;
|
|
28
28
|
};
|
|
29
|
-
checkedReset: PropType<
|
|
30
|
-
extra: PropType<
|
|
31
|
-
}
|
|
32
|
-
checkable: boolean | undefined;
|
|
29
|
+
checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
|
|
30
|
+
extra: PropType<ColumnSettingProps["extra"]>;
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
33
32
|
draggable: boolean | undefined;
|
|
34
|
-
|
|
33
|
+
checkable: boolean | undefined;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
35
|
export default ColumnSetting;
|
|
@@ -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 genColumnSettingStyle: GenerateStyle<ProAliasToken>;
|
|
@@ -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
|
-
search: {
|
|
6
|
-
type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
|
|
7
|
-
default: () => import("../../types/TableTypings").SearchConfig;
|
|
8
|
-
};
|
|
4
|
+
declare const tableForm: {
|
|
9
5
|
modal: 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
19
|
defaultParams: PropType<RecordType>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
searchMap: ProSearchMap<"text">[];
|
|
35
|
-
}>;
|
|
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,62 @@
|
|
|
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
|
+
export interface ListToolBarSetting {
|
|
4
4
|
icon: VueNode;
|
|
5
5
|
tooltip?: string;
|
|
6
6
|
key?: string;
|
|
7
7
|
onClick?: (key?: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const ListToolBar: import("vue").DefineComponent<{
|
|
8
|
+
}
|
|
9
|
+
declare const ListToolBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
10
|
actions: {
|
|
11
|
-
type: PropType<import("
|
|
11
|
+
type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
|
|
12
12
|
default: () => undefined;
|
|
13
13
|
};
|
|
14
14
|
settings: PropType<VueNode[]>;
|
|
15
15
|
titleTip: {
|
|
16
|
-
type: PropType<import("
|
|
16
|
+
type: PropType<import("../..").ProTableProps["titleTip"]>;
|
|
17
17
|
default: () => undefined;
|
|
18
18
|
};
|
|
19
19
|
prefixCls: StringConstructor;
|
|
20
20
|
headerTitle: {
|
|
21
|
-
type: PropType<import("
|
|
21
|
+
type: PropType<import("../..").ProTableProps["headerTitle"]>;
|
|
22
22
|
default: () => undefined;
|
|
23
23
|
};
|
|
24
24
|
titleTipText: {
|
|
25
|
-
type: PropType<
|
|
25
|
+
type: PropType<import("../..").ProTableProps["titleTipText"]>;
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
28
|
optionsExtra: {
|
|
29
|
-
type: PropType<import("
|
|
29
|
+
type: PropType<import("../..").ProTableProps["optionsExtra"]>;
|
|
30
30
|
default: () => undefined;
|
|
31
31
|
};
|
|
32
|
-
}
|
|
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("
|
|
34
|
+
type: PropType<import("../..").ProTableProps["toolBarBtn"]>;
|
|
35
35
|
default: () => undefined;
|
|
36
36
|
};
|
|
37
37
|
settings: PropType<VueNode[]>;
|
|
38
38
|
titleTip: {
|
|
39
|
-
type: PropType<import("
|
|
39
|
+
type: PropType<import("../..").ProTableProps["titleTip"]>;
|
|
40
40
|
default: () => undefined;
|
|
41
41
|
};
|
|
42
42
|
prefixCls: StringConstructor;
|
|
43
43
|
headerTitle: {
|
|
44
|
-
type: PropType<import("
|
|
44
|
+
type: PropType<import("../..").ProTableProps["headerTitle"]>;
|
|
45
45
|
default: () => undefined;
|
|
46
46
|
};
|
|
47
47
|
titleTipText: {
|
|
48
|
-
type: PropType<
|
|
48
|
+
type: PropType<import("../..").ProTableProps["titleTipText"]>;
|
|
49
49
|
default: string;
|
|
50
50
|
};
|
|
51
51
|
optionsExtra: {
|
|
52
|
-
type: PropType<import("
|
|
52
|
+
type: PropType<import("../..").ProTableProps["optionsExtra"]>;
|
|
53
53
|
default: () => undefined;
|
|
54
54
|
};
|
|
55
|
-
}
|
|
55
|
+
}>> & Readonly<{}>, {
|
|
56
56
|
titleTipText: string | undefined;
|
|
57
|
-
titleTip: import("../../types/SlotsTypings").
|
|
58
|
-
headerTitle: import("../../types/SlotsTypings").
|
|
59
|
-
optionsExtra: import("../../types/SlotsTypings").
|
|
60
|
-
actions: import("../../types/SlotsTypings").
|
|
61
|
-
}>;
|
|
57
|
+
titleTip: import("../../types/SlotsTypings").DefaultRender;
|
|
58
|
+
headerTitle: import("../../types/SlotsTypings").DefaultRender;
|
|
59
|
+
optionsExtra: import("../../types/SlotsTypings").DefaultRender;
|
|
60
|
+
actions: import("../../types/SlotsTypings").DefaultRender;
|
|
61
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
62
62
|
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,7 +1,7 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OptionConfig, ProTableProps } from '../../types/TableTypings';
|
|
3
3
|
export type OptionsFunctionType = () => void;
|
|
4
|
-
export
|
|
4
|
+
export interface ToolBarProps {
|
|
5
5
|
headerTitle?: ProTableProps['headerTitle'];
|
|
6
6
|
titleTip?: ProTableProps['titleTip'];
|
|
7
7
|
toolBarBtn?: ProTableProps['toolBarBtn'];
|
|
@@ -9,22 +9,22 @@ export type ToolBarProps = {
|
|
|
9
9
|
optionsExtra?: ProTableProps['optionsExtra'];
|
|
10
10
|
settingExtra?: ProTableProps['settingExtra'];
|
|
11
11
|
options?: OptionConfig | boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const ToolbarRender: import("vue").DefineComponent<{
|
|
14
|
-
options: PropType<
|
|
15
|
-
titleTip: PropType<
|
|
16
|
-
settingExtra: PropType<
|
|
17
|
-
optionsExtra: PropType<
|
|
18
|
-
titleTipText: PropType<
|
|
19
|
-
toolBarBtn: PropType<
|
|
20
|
-
headerTitle: PropType<
|
|
21
|
-
}
|
|
22
|
-
options: PropType<
|
|
23
|
-
titleTip: PropType<
|
|
24
|
-
settingExtra: PropType<
|
|
25
|
-
optionsExtra: PropType<
|
|
26
|
-
titleTipText: PropType<
|
|
27
|
-
toolBarBtn: PropType<
|
|
28
|
-
headerTitle: PropType<
|
|
29
|
-
}
|
|
12
|
+
}
|
|
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
|
+
}>, () => import("vue/jsx-runtime").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,19 @@
|
|
|
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, SettingsAction } from '../hooks/useColumnSetting';
|
|
5
|
+
import type { ProColumnsType } from '../types/ColumnTypings';
|
|
6
|
+
import type { Slots } from '../types/SlotsTypings';
|
|
7
|
+
import type { SearchConfig } from '../types/TableTypings';
|
|
8
|
+
export interface ProTableContextProps {
|
|
9
|
+
columns: ComputedRef<ProColumnsType>;
|
|
10
|
+
isMobile: ComputedRef<boolean>;
|
|
11
|
+
searchConfig: ComputedRef<SearchConfig>;
|
|
12
|
+
searchActions: ComputedRef<SearchConfig['actions']>;
|
|
13
|
+
manualSearch: ComputedRef<boolean>;
|
|
14
|
+
cacheColumns: ComputedRef<ProColumnsType>;
|
|
15
|
+
tableSize: Ref<SizeType>;
|
|
16
|
+
action: {
|
|
13
17
|
/** @name 刷新 */
|
|
14
18
|
reload: (info?: any) => void;
|
|
15
19
|
toggle: () => Promise<void>;
|
|
@@ -19,8 +23,6 @@ export interface TableContextProps {
|
|
|
19
23
|
settingsAction: SettingsAction;
|
|
20
24
|
slots: Slots;
|
|
21
25
|
changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
|
|
22
|
-
[key: string]: any;
|
|
23
26
|
}
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
export declare const useTableContext: () => Required<TableContextProps>;
|
|
27
|
+
declare const provideTableContext: (value: ProTableContextProps) => void, useTableContext: (injectDefaultValue?: ProTableContextProps | undefined) => ProTableContextProps;
|
|
28
|
+
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,8 +10,8 @@ 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>;
|
|
@@ -19,11 +19,11 @@ export type SettingsAction = {
|
|
|
19
19
|
setSortKeyColumns: (value: string[]) => void;
|
|
20
20
|
cacheColumnsMap: Record<string, ColumnsState>;
|
|
21
21
|
setColumnsMap: (value: Record<string, ColumnsState>, key?: SettingsOperationType) => void;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
22
|
+
}
|
|
23
|
+
export interface ColumnsStateType {
|
|
24
24
|
value?: Record<string, ColumnsState>;
|
|
25
25
|
onChange?: (map: Record<string, ColumnsState>) => void;
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
export declare function useColumnSetting({ columns, columnsState, changeColumns }: {
|
|
28
28
|
columns: Ref<ProColumnsType>;
|
|
29
29
|
columnsState: Ref<ColumnsStateType | undefined>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { ComputedRef, Ref } 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
|
+
cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
|
|
98
|
+
setColumns: (columnList: ProColumnsType) => void;
|
|
99
|
+
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
|
100
|
+
resizeColumnWidth: (width: number, col: ProColumnType) => void;
|
|
101
|
+
};
|
|
102
|
+
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;
|