@gx-design-vue/pro-table 0.2.0-beta.10 → 0.2.0-beta.101
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 +220 -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/ColumnSetting/index.d.ts +16 -16
- package/dist/components/ColumnSetting/style.d.ts +2 -5
- package/dist/components/Form/dateFormat.d.ts +20 -0
- package/dist/components/Form/index.d.ts +39 -21
- package/dist/components/Form/style.d.ts +2 -5
- 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/useColums.d.ts +92 -11
- package/dist/hooks/useDebounceFn.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +19 -14
- package/dist/hooks/useLoading.d.ts +5 -4
- package/dist/hooks/usePagination.d.ts +8 -3
- 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 +6 -5
- package/dist/pro-table.js +2840 -0
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +89 -358
- package/dist/style.d.ts +2 -6
- package/dist/types/ColumnTypings.d.ts +34 -16
- package/dist/types/SlotsTypings.d.ts +42 -9
- package/dist/types/TableTypings.d.ts +116 -67
- package/dist/utils/utils.d.ts +4 -1
- package/package.json +20 -43
- package/volar.d.ts +3 -3
- package/dist/pro-table.mjs +0 -35085
- 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 { 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
|
-
}
|
|
29
|
+
checkedReset: PropType<ColumnSettingProps["checkedReset"]>;
|
|
30
|
+
extra: PropType<ColumnSettingProps["extra"]>;
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
32
|
checkable: boolean | undefined;
|
|
33
33
|
draggable: boolean | undefined;
|
|
34
|
-
}>;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
35
|
export default ColumnSetting;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
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,20 @@
|
|
|
1
|
+
type FormatType = ((dayjs: any) => string) | string | undefined;
|
|
2
|
+
/**
|
|
3
|
+
* 通过 format 来格式化日期,因为支持了function 所以需要单独的方法来处理
|
|
4
|
+
* @param {any} endText
|
|
5
|
+
* @param {FormatType} format
|
|
6
|
+
* @return string
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatString(endText: any, format: FormatType): string;
|
|
9
|
+
export declare function valueFormater(valueFormat?: string, showTime?: any): string;
|
|
10
|
+
/**
|
|
11
|
+
* 格式化区域日期,如果是一个数组,会返回 start ~ end 数组
|
|
12
|
+
* @param {any} value
|
|
13
|
+
* @param {FormatType | FormatType[]} format
|
|
14
|
+
* returns string[] | Dayjs[]
|
|
15
|
+
*/
|
|
16
|
+
export declare const dateArrayFormatter: (value: any[], format: FormatType | FormatType[] | {
|
|
17
|
+
format: string;
|
|
18
|
+
type?: "mask";
|
|
19
|
+
}, type?: "dayjs" | "string") => any | undefined;
|
|
20
|
+
export {};
|
|
@@ -1,36 +1,54 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { RecordType } from '@gx-design-vue/pro-utils';
|
|
3
2
|
import type { ProSearchMap } from '../../types/ColumnTypings';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
|
|
7
|
-
default: () => import("../../types/TableTypings").SearchConfig;
|
|
8
|
-
};
|
|
3
|
+
import { type RecordType } from '@gx-design-vue/pro-utils';
|
|
4
|
+
declare const ProTableForm: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
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:
|
|
10
|
+
loading: {
|
|
11
|
+
type: PropType<boolean | import("ant-design-vue").SpinProps>;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
cardBordered: {
|
|
15
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["showIndex"]>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
15
18
|
prefixCls: PropType<string>;
|
|
16
19
|
defaultParams: PropType<RecordType>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
|
|
20
|
-
default: () => import("../../types/TableTypings").SearchConfig;
|
|
21
|
-
};
|
|
20
|
+
onSearch: PropType<(formState: any, buttonActions?: "reset" | "submit") => any>;
|
|
21
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
22
|
modal: PropType<boolean | undefined>;
|
|
23
23
|
searchMap: {
|
|
24
|
-
type: PropType<ProSearchMap
|
|
24
|
+
type: PropType<ProSearchMap[]>;
|
|
25
25
|
default: () => never[];
|
|
26
26
|
};
|
|
27
|
-
loading:
|
|
27
|
+
loading: {
|
|
28
|
+
type: PropType<boolean | import("ant-design-vue").SpinProps>;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
cardBordered: {
|
|
32
|
+
type: PropType<import("../../types/TableTypings").ProTableProps["showIndex"]>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
28
35
|
prefixCls: PropType<string>;
|
|
29
36
|
defaultParams: PropType<RecordType>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
onSearch: PropType<(formState: any, buttonActions?: "reset" | "submit") => any>;
|
|
38
|
+
}>> & Readonly<{}>, {
|
|
39
|
+
loading: boolean | Partial<import("vue").ExtractPropTypes<{
|
|
40
|
+
prefixCls: StringConstructor;
|
|
41
|
+
spinning: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: any;
|
|
44
|
+
};
|
|
45
|
+
size: PropType<import("ant-design-vue/es/spin/Spin").SpinSize>;
|
|
46
|
+
wrapperClassName: StringConstructor;
|
|
47
|
+
tip: import("vue-types").VueTypeValidableDef<any>;
|
|
48
|
+
delay: NumberConstructor;
|
|
49
|
+
indicator: import("vue-types").VueTypeValidableDef<any>;
|
|
50
|
+
}>>;
|
|
51
|
+
cardBordered: boolean | undefined;
|
|
52
|
+
searchMap: ProSearchMap<"text", string>[];
|
|
53
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
54
|
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>;
|
|
@@ -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>;
|
|
@@ -1,24 +1,105 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import type { ProColumnsType, ProColumnType } from '../types/ColumnTypings';
|
|
3
3
|
import type { ProTableProps } from '../types/TableTypings';
|
|
4
|
-
import type {
|
|
5
|
-
export
|
|
4
|
+
import type { ColumnsState } from './useColumnSetting';
|
|
5
|
+
export interface ConfigColumns {
|
|
6
6
|
draggabled: ComputedRef<ProTableProps['draggabled']>;
|
|
7
7
|
neverScroll: ComputedRef<ProTableProps['neverScroll']>;
|
|
8
8
|
autoScroll: ComputedRef<ProTableProps['autoScroll']>;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
type UseColumnsType = {
|
|
11
11
|
scroll: ComputedRef<ProTableProps['scroll']>;
|
|
12
|
-
breakpoint: ComputedRef<boolean>;
|
|
12
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
13
13
|
columns: ComputedRef<ProColumnsType>;
|
|
14
14
|
} & ConfigColumns;
|
|
15
15
|
export declare function useConfigColumns(props: ProTableProps): ConfigColumns;
|
|
16
16
|
export declare function useColumns({ scroll, columns, breakpoint, draggabled, autoScroll, neverScroll }: UseColumnsType): {
|
|
17
|
-
breakpoint: ComputedRef<boolean>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
breakpoint: ComputedRef<boolean | undefined>;
|
|
18
|
+
proColumns: ComputedRef<(import("@gx-design-vue/pro-utils/dist").DefaultProColumn & Omit<import("ant-design-vue/es/table/interface").ColumnType<import("@gx-design-vue/pro-utils/dist").RecordType>, "key" | "dataIndex" | "width"> & {
|
|
19
|
+
children?: ProColumnsType<import("@gx-design-vue/pro-utils/dist").RecordType, import("@gx-design-vue/pro-utils/dist").RecordType> | undefined;
|
|
20
|
+
uuid?: string | number;
|
|
21
|
+
index?: number;
|
|
22
|
+
copyText?: string | ((record: ProColumnType) => string);
|
|
23
|
+
tooltip?: false | (Partial<import("vue").ExtractPropTypes<{
|
|
24
|
+
title: import("vue-types").VueTypeValidableDef<any>;
|
|
25
|
+
trigger: import("vue").PropType<import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType | import("ant-design-vue/es/tooltip/abstractTooltipProps").TriggerType[]>;
|
|
26
|
+
open: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
visible: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
placement: import("vue").PropType<import("ant-design-vue/es/tooltip").TooltipPlacement>;
|
|
35
|
+
color: import("vue").PropType<import("ant-design-vue/es/_util/type").LiteralUnion<import("ant-design-vue/es/_util/colors").PresetColorType>>;
|
|
36
|
+
transitionName: StringConstructor;
|
|
37
|
+
overlayStyle: {
|
|
38
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
39
|
+
default: import("vue").CSSProperties;
|
|
40
|
+
};
|
|
41
|
+
overlayInnerStyle: {
|
|
42
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
43
|
+
default: import("vue").CSSProperties;
|
|
44
|
+
};
|
|
45
|
+
overlayClassName: StringConstructor;
|
|
46
|
+
openClassName: StringConstructor;
|
|
47
|
+
prefixCls: StringConstructor;
|
|
48
|
+
mouseEnterDelay: NumberConstructor;
|
|
49
|
+
mouseLeaveDelay: NumberConstructor;
|
|
50
|
+
getPopupContainer: import("vue").PropType<(triggerNode: HTMLElement) => HTMLElement>;
|
|
51
|
+
arrowPointAtCenter: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: any;
|
|
54
|
+
};
|
|
55
|
+
arrow: {
|
|
56
|
+
type: import("vue").PropType<boolean | {
|
|
57
|
+
pointAtCenter?: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
default: boolean | {
|
|
60
|
+
pointAtCenter?: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
autoAdjustOverflow: {
|
|
64
|
+
type: import("vue").PropType<boolean | import("ant-design-vue/es/tooltip").AdjustOverflow>;
|
|
65
|
+
default: boolean | import("ant-design-vue/es/tooltip").AdjustOverflow;
|
|
66
|
+
};
|
|
67
|
+
destroyTooltipOnHide: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: any;
|
|
70
|
+
};
|
|
71
|
+
align: {
|
|
72
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").AlignType>;
|
|
73
|
+
default: import("ant-design-vue/es/vc-trigger/interface").AlignType;
|
|
74
|
+
};
|
|
75
|
+
builtinPlacements: {
|
|
76
|
+
type: import("vue").PropType<import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements>;
|
|
77
|
+
default: import("ant-design-vue/es/vc-trigger/interface").BuildInPlacements;
|
|
78
|
+
};
|
|
79
|
+
children: ArrayConstructor;
|
|
80
|
+
onVisibleChange: import("vue").PropType<(vis: boolean) => void>;
|
|
81
|
+
'onUpdate:visible': import("vue").PropType<(vis: boolean) => void>;
|
|
82
|
+
onOpenChange: import("vue").PropType<(vis: boolean) => void>;
|
|
83
|
+
'onUpdate:open': import("vue").PropType<(vis: boolean) => void>;
|
|
84
|
+
}>> & {
|
|
85
|
+
width?: number;
|
|
86
|
+
targetStyle?: Partial<import("vue").CSSProperties>;
|
|
87
|
+
hiddenLine?: number;
|
|
88
|
+
class?: string;
|
|
89
|
+
}) | undefined;
|
|
90
|
+
show?: boolean;
|
|
91
|
+
key?: string | undefined;
|
|
92
|
+
dataIndex?: string | undefined;
|
|
93
|
+
order?: number;
|
|
94
|
+
hideInSetting?: boolean;
|
|
95
|
+
searchConfig?: import("../types/ColumnTypings").ProSearchMap<undefined, string> | undefined;
|
|
96
|
+
copyable?: boolean;
|
|
97
|
+
columnEmptyText?: string;
|
|
98
|
+
valueType?: import("../types/ColumnTypings").ProColumnsValueType;
|
|
99
|
+
})[]>;
|
|
100
|
+
cacheProColumns: Ref<ProColumnsType, ProColumnsType>;
|
|
101
|
+
setColumns: (columnList: ProColumnsType) => void;
|
|
21
102
|
changeColumns: (columnState: Record<string, ColumnsState>) => void;
|
|
22
|
-
resizeColumnWidth: (
|
|
103
|
+
resizeColumnWidth: (width: number, col: ProColumnType) => void;
|
|
23
104
|
};
|
|
24
105
|
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;
|